Commit 47300aef authored by Christophe Benz's avatar Christophe Benz
Browse files

Fix types

parent dcb7328a
......@@ -247,7 +247,7 @@ class GitWalker:
tsv_str = load_blob_str(series_tsv_blob)
reader = csv.reader(StringIO(tsv_str), dialect="excel-tab")
def to_value(value: str) -> Optional[float]:
def to_value(value: str) -> Optional[Union[float, str]]:
if value == NA:
return None
......@@ -256,7 +256,7 @@ class GitWalker:
return value
def to_observation(row: list) -> tuple[str, Optional[float]]:
def to_observation(row: list) -> tuple[str, Optional[Union[float, str]]]:
return (row[0], to_value(row[1]))
return list(map(to_observation, reader))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment