Skip to content

Commit d5815f6

Browse files
committed
test(simulations): improve simulation builder doc
1 parent 46e6624 commit d5815f6

File tree

7 files changed

+481
-139
lines changed

7 files changed

+481
-139
lines changed

openfisca_core/simulations/_build_from_variables.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from openfisca_core import errors
99

1010
from ._build_default_simulation import _BuildDefaultSimulation
11-
from ._guards import is_variable_dated
11+
from ._guards import is_a_dated_value, is_a_pure_value
1212
from .simulation import Simulation
1313
from .types import Populations, TaxBenefitSystem, Variables
1414

@@ -142,7 +142,7 @@ def add_dated_values(self) -> Self:
142142
"""
143143

144144
for variable, value in self.variables.items():
145-
if is_variable_dated(dated_variable := value):
145+
if is_a_dated_value(dated_variable := value):
146146
for period, dated_value in dated_variable.items():
147147
self.simulation.set_input(variable, period, dated_value)
148148

@@ -200,7 +200,7 @@ def add_undated_values(self) -> Self:
200200
"""
201201

202202
for variable, value in self.variables.items():
203-
if not is_variable_dated(undated_value := value):
203+
if is_a_pure_value(undated_value := value):
204204
if (period := self.default_period) is None:
205205
message = (
206206
"Can't deal with type: expected object. Input "

0 commit comments

Comments
 (0)