@@ -117,11 +117,11 @@ class PEP440Warning(RuntimeWarning):
117
117
parse_version = packaging .version .Version
118
118
119
119
120
- _state_vars : Dict [str , Any ] = {}
120
+ _state_vars : Dict [str , str ] = {}
121
121
122
122
123
- def _declare_state (vartype : str , ** kw : object ) -> None :
124
- _state_vars . update ( dict . fromkeys ( kw , vartype ))
123
+ def _declare_state (vartype : str , varname : str ) -> None :
124
+ _state_vars [ varname ] = vartype
125
125
126
126
127
127
def __getstate__ ():
@@ -2024,7 +2024,7 @@ def __init__(self, importer):
2024
2024
_distribution_finders : Dict [
2025
2025
type , Callable [[object , str , bool ], Iterable ["Distribution" ]]
2026
2026
] = {}
2027
- _declare_state ('dict' , _distribution_finders = _distribution_finders )
2027
+ _declare_state ('dict' , ' _distribution_finders' )
2028
2028
2029
2029
2030
2030
def register_finder (importer_type , distribution_finder ):
@@ -2200,9 +2200,9 @@ def resolve_egg_link(path):
2200
2200
_namespace_handlers : Dict [
2201
2201
type , Callable [[object , str , str , types .ModuleType ], Optional [str ]]
2202
2202
] = {}
2203
- _declare_state ('dict' , _namespace_handlers = _namespace_handlers )
2203
+ _declare_state ('dict' , ' _namespace_handlers' )
2204
2204
_namespace_packages : Dict [Optional [str ], List [str ]] = {}
2205
- _declare_state ('dict' , _namespace_packages = _namespace_packages )
2205
+ _declare_state ('dict' , ' _namespace_packages' )
2206
2206
2207
2207
2208
2208
def register_namespace_handler (importer_type , namespace_handler ):
@@ -3302,7 +3302,7 @@ def _initialize_master_working_set():
3302
3302
at their own risk.
3303
3303
"""
3304
3304
working_set = WorkingSet ._build_master ()
3305
- _declare_state ('object' , working_set = working_set )
3305
+ _declare_state ('object' , ' working_set' )
3306
3306
3307
3307
require = working_set .require
3308
3308
iter_entry_points = working_set .iter_entry_points
0 commit comments