Skip to content

Commit

Permalink
fix variable with same name as function
Browse files Browse the repository at this point in the history
  • Loading branch information
jensdebruijn committed Sep 3, 2024
1 parent 4c44569 commit 3da4cc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions honeybees/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, model, folder: str) -> None:
and "report" in self.model.config
and self.model.config["report"] is not None
):
self.report = True
self.enabled = True
for name, conf in self.model.config["report"].items():
if conf["format"] == "zarr":
filepath = os.path.join(self.export_folder, name + ".zarr.zip")
Expand All @@ -116,7 +116,7 @@ def __init__(self, model, folder: str) -> None:
conf["_file"] = ds
conf["_time_index"] = time
else:
self.report = False
self.enabled = False

self.step()

Expand Down Expand Up @@ -405,7 +405,7 @@ def extract_agent_data(self, name: str, conf: dict) -> None:
def step(self) -> None:
"""This method is called every timestep. First appends the current model time to the list of times for the reporter. Then iterates through the data to be reported on and calls the extract_agent_data method for each of them."""
self.timesteps.append(self.model.current_time)
if self.report:
if self.enabled:
for name, conf in self.model.config["report"].items():
self.extract_agent_data(name, conf)

Expand Down

0 comments on commit 3da4cc5

Please sign in to comment.