File tree Expand file tree Collapse file tree 4 files changed +14
-9
lines changed
Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class CorePopulation:
2828 """Base class to build populations from.
2929
3030 Args:
31- entity: The :class:`.CoreEntity` of the population.
31+ entity: The :class:`~entities .CoreEntity` of the population.
3232 *__args: Variable length argument list.
3333 **__kwds: Arbitrary keyword arguments.
3434
@@ -43,7 +43,7 @@ class CorePopulation:
4343 #: A pseudo index for the members of the population.
4444 ids : Sequence [str ] = []
4545
46- #: The :class:`.Simulation` for which the population is calculated.
46+ #: The :class:`~simulations .Simulation` for which the population is calculated.
4747 simulation : None | t .Simulation = None
4848
4949 #: The holders of the variables.
@@ -67,7 +67,7 @@ def __call__(
6767 options: The options to use for the calculation.
6868
6969 Returns:
70- None: If there is no :class:`.Simulation`.
70+ None: If there is no :class:`~simulations .Simulation`.
7171 ndarray[generic]: The result of the calculation.
7272
7373 Raises:
Original file line number Diff line number Diff line change 11from openfisca_core import types as t
22
3+ from ._enums import Option
4+
35
46class IncompatibleOptionsError (ValueError ):
57 """Raised when two options are incompatible."""
68
79 def __init__ (self , variable_name : t .VariableName ) -> None :
8- add , divide = t . Option
10+ add , divide = Option
911 msg = (
1012 f"Options { add } and { divide } are incompatible (trying to compute "
1113 f"variable { variable_name } )."
Original file line number Diff line number Diff line change @@ -71,7 +71,8 @@ def modify_parameters(self, modifier_function):
7171 Call this function in `apply()` if the reform asks for legislation parameter modifications.
7272
7373 Args:
74- modifier_function: A function that takes a :obj:`.ParameterNode` and should return an object of the same type.
74+ modifier_function: A function that takes a :obj:`~parameters.ParameterNode` and should return an object of
75+ the same type.
7576
7677 """
7778 baseline_parameters = self .baseline .parameters
Original file line number Diff line number Diff line change @@ -406,15 +406,12 @@ def offset(
406406#: Type alias for a period-like object.
407407PeriodLike : TypeAlias = Union [Period , PeriodStr , PeriodInt ]
408408
409+
409410# Populations
410411
411412#: Type alias for a population's holders.
412413HolderByVariable : TypeAlias = MutableMapping ["VariableName" , Holder [_N ]]
413414
414- # TODO(Mauko Quiroga-Alvarado): I'm not sure if this type alias is correct.
415- # https://openfisca.org/doc/coding-the-legislation/50_entities.html
416- Members : TypeAlias = Iterable ["SinglePopulation" ]
417-
418415
419416class MemoryUsageByVariable (TypedDict , total = False ):
420417 by_variable : dict [VariableName , MemoryUsage ]
@@ -448,6 +445,11 @@ def members_entity_id(self, /) -> StrArray: ...
448445 def nb_persons (self , / , __role : None | Role = ...) -> int : ...
449446
450447
448+ # TODO(Mauko Quiroga-Alvarado): I'm not sure if this type alias is correct.
449+ # https://openfisca.org/doc/coding-the-legislation/50_entities.html
450+ Members : TypeAlias = Iterable [SinglePopulation ]
451+
452+
451453# Simulations
452454
453455
You can’t perform that action at this time.
0 commit comments