Currently:
|
@final |
|
class LazyImportType: |
|
@property |
|
def __name__(self) -> str: ... |
|
def resolve(self) -> Any: ... |
But (on 3.15.0rc2):
import sys
lazy import abc
lazy_import = sys.modules[__name__].__dict__['abc']
lazy_import
#> <lazy_import 'abc'>
lazy_import.__name__
#> AttributeError: cannot access attribute '__name__' on unresolved lazy import 'abc'. Did you mean '.__ne__' instead of '.__name__'?
Can send PR.
Currently:
typeshed/stdlib/types.pyi
Lines 611 to 615 in 5b9d624
But (on 3.15.0rc2):
Can send PR.