From ea1d5f9752c222a7903897ca23c2b1812b9c60ac Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Wed, 26 Aug 2020 21:16:36 +0200 Subject: [PATCH] Load json without casting It will avoid json stuff cast as string. It is a workaround for this https://github.com/ltworf/typedload/pull/140 But anyway cast is not needed so it is fine to disable it. --- relational/relation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/relational/relation.py b/relational/relation.py index b20e8e4..6ec03d2 100644 --- a/relational/relation.py +++ b/relational/relation.py @@ -89,7 +89,11 @@ class Relation: for row in loaded['content']: if len(row) != len(header): raise ValueError(f'Line {row} contains an incorrect amount of values') - t_row: Tuple[Optional[Union[int, float, str, Rdate]], ...] = load(row, Tuple[Optional[Union[int, float, str, Rdate]], ...]) # type: ignore + t_row: Tuple[Optional[Union[int, float, str, Rdate]], ...] = load( + row, + Tuple[Optional[Union[int, float, str, Rdate]], ...], # type: ignore + basiccast=False + ) content.append(t_row) return Relation(header, frozenset(content))