Skip to content

Commit

Permalink
test(simulations): improve simulation builder doc
Browse files Browse the repository at this point in the history
  • Loading branch information
bonjourmauko committed Sep 16, 2024
1 parent 46e6624 commit d5815f6
Show file tree
Hide file tree
Showing 7 changed files with 481 additions and 139 deletions.
6 changes: 3 additions & 3 deletions openfisca_core/simulations/_build_from_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from openfisca_core import errors

from ._build_default_simulation import _BuildDefaultSimulation
from ._guards import is_variable_dated
from ._guards import is_a_dated_value, is_a_pure_value
from .simulation import Simulation
from .types import Populations, TaxBenefitSystem, Variables

Expand Down Expand Up @@ -142,7 +142,7 @@ def add_dated_values(self) -> Self:
"""

for variable, value in self.variables.items():
if is_variable_dated(dated_variable := value):
if is_a_dated_value(dated_variable := value):
for period, dated_value in dated_variable.items():
self.simulation.set_input(variable, period, dated_value)

Expand Down Expand Up @@ -200,7 +200,7 @@ def add_undated_values(self) -> Self:
"""

for variable, value in self.variables.items():
if not is_variable_dated(undated_value := value):
if is_a_pure_value(undated_value := value):
if (period := self.default_period) is None:
message = (
"Can't deal with type: expected object. Input "
Expand Down
Loading

0 comments on commit d5815f6

Please sign in to comment.