File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 22
33import builtins
44import enum
5- import functools
65import keyword
76import sys
87import types
@@ -23,12 +22,16 @@ class _LazyImporter:
2322 def __getattr__ (self , name ):
2423 if name == "ast" :
2524 import ast
26- setattr ( self , " ast" , ast )
25+ self . ast = ast
2726 return ast
2827 elif name == "_Stringifier" :
2928 from ._stringifier import _Stringifier
30- setattr ( self , " _Stringifier" , _Stringifier )
29+ self . _Stringifier = _Stringifier
3130 return _Stringifier
31+ elif name == "functools" :
32+ import functools
33+ self .functools = functools
34+ return functools
3235 else :
3336 raise AttributeError (
3437 f"{ self .__class__ .__name__ !r} object has no attribute { name !r} "
@@ -588,7 +591,7 @@ def get_annotations(
588591 if hasattr (unwrap , "__wrapped__" ):
589592 unwrap = unwrap .__wrapped__
590593 continue
591- if isinstance (unwrap , functools .partial ):
594+ if isinstance (unwrap , _laz . functools .partial ):
592595 unwrap = unwrap .func
593596 continue
594597 break
You can’t perform that action at this time.
0 commit comments