From a03c374f2cf532ac73ad687754ee966fe35085bd Mon Sep 17 00:00:00 2001 From: "PolicyEngine[bot]" Date: Mon, 2 Sep 2024 19:23:09 +0200 Subject: [PATCH] fix: Syntax error in Simulation class --- changelog_entry.yaml | 4 ++++ policyengine_core/simulations/simulation.py | 8 +++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29b..6a5e3101 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + fixed: + - Syntax error in Simulation class \ No newline at end of file diff --git a/policyengine_core/simulations/simulation.py b/policyengine_core/simulations/simulation.py index 1dafaca1..c10ba3e2 100644 --- a/policyengine_core/simulations/simulation.py +++ b/policyengine_core/simulations/simulation.py @@ -1418,11 +1418,9 @@ def check_macro_cache(self, variable_name: str, period: str) -> bool: """ Check if the variable is able to have cached value """ - if ( - hasattr(self, "dataset") - and self.dataset.data_format == Dataset.FLAT_FILE - ): - return False + if hasattr(self, "dataset"): + if self.dataset.data_format == Dataset.FLAT_FILE: + return False if self.is_over_dataset: return True