11from __future__ import annotations
22
3- from typing import Optional , Sequence
3+ from typing import Any , Dict , Optional , Sequence
44
55import copy
66import glob
@@ -39,7 +39,7 @@ class TaxBenefitSystem:
3939
4040 """
4141 _base_tax_benefit_system = None
42- _parameters_at_instant_cache = None
42+ _parameters_at_instant_cache : Optional [ Dict [ Any , Any ]] = None
4343 person_key_plural = None
4444 preprocess_parameters = None
4545 baseline = None # Baseline tax-benefit system. Used only by reforms. Note: Reforms can be chained.
@@ -50,8 +50,8 @@ def __init__(self, entities: Sequence[Entity]) -> None:
5050 # TODO: Currently: Don't use a weakref, because they are cleared by Paste (at least) at each call.
5151 self .parameters : Optional [ParameterNode ] = None
5252 self ._parameters_at_instant_cache = {} # weakref.WeakValueDictionary()
53- self .variables = {}
54- self .open_api_config = {}
53+ self .variables : Dict [ Any , Any ] = {}
54+ self .open_api_config : Dict [ Any , Any ] = {}
5555 # Tax benefit systems are mutable, so entities (which need to know about our variables) can't be shared among them
5656 if entities is None or len (entities ) == 0 :
5757 raise Exception ("A tax and benefit sytem must have at least an entity." )
0 commit comments