File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1+ from types import ModuleType
2+ from typing import Tuple
3+
14import importlib
25import os
36import traceback
811from openfisca_core .warnings import LibYAMLWarning
912
1013
11- def import_country_package (country_package_name ) :
14+ def import_country_package (country_package_name : str ) -> ModuleType :
1215 """Import a country package."""
1316
1417 try :
@@ -27,7 +30,7 @@ def import_country_package(country_package_name):
2730 raise ImportError (message ) from error
2831
2932
30- def import_yaml ():
33+ def import_yaml () -> Tuple [ ModuleType , yaml . cyaml . CLoader ] :
3134 """Import the yaml library."""
3235
3336 try :
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def __init__(self, name: str) -> None:
2121 # When the enum item is initialized, self._member_names_ contains the
2222 # names of the previously initialized items, so its length is the index
2323 # of this item.
24- self .index = len (self ._member_names_ )
24+ self .index = len (self ._member_names_ ) # type: ignore
2525
2626 # Bypass the slow Enum.__eq__
2727 __eq__ = object .__eq__
Original file line number Diff line number Diff line change 88 import numpy
99
1010 from openfisca_core .indexed_enums import EnumArray
11- from openfisca_core .periods import Period
1211
1312 Array = typing .Union [EnumArray , numpy .typing .ArrayLike ]
1413 Time = typing .Union [float , int ]
You can’t perform that action at this time.
0 commit comments