Skip to content

Commit

Permalink
Attempt to fix mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
Isabelle-C committed Oct 7, 2023
1 parent 13bdd48 commit 40150ea
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/arcade_collection/output/parse_growth_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ def parse_growth_file(tar: tarfile.TarFile) -> pd.DataFrame:
all_timepoints = []
for member in tar.getmembers():
extracted_member = tar.extractfile(member)
extracted_json = json.loads(extracted_member.read().decode("utf-8"))
seed = extracted_json["seed"]

all_timepoints.extend(
[
data
for timepoint in extracted_json["timepoints"]
for data in parse_growth_timepoint(timepoint, seed)
]
)
if extracted_member is not None:
extracted_json = json.loads(extracted_member.read().decode("utf-8"))
seed = extracted_json["seed"]

all_timepoints.extend(
[
data
for timepoint in extracted_json["timepoints"]
for data in parse_growth_timepoint(timepoint, seed)
]
)

timepoints_df = pd.DataFrame(all_timepoints, columns=GROWTH_COLUMNS)
return timepoints_df
Expand Down

0 comments on commit 40150ea

Please sign in to comment.