Merge pull request #36 from ltworf/disable_cast

Disable cast when loading json
This commit is contained in:
Salvo 'LtWorf' Tomaselli 2020-08-26 21:22:01 +02:00 committed by GitHub
commit 9620b24536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))