mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-01 00:53:23 +08:00
importlib.metadata: Improve and test SimplePath protocol (#11436)
Co-authored-by: layday <layday@protonmail.com>
This commit is contained in:
@@ -180,6 +180,8 @@ def run_testcases(
|
||||
# Avoid race conditions when reading the cache
|
||||
# (https://github.com/python/typeshed/issues/11220)
|
||||
"--no-incremental",
|
||||
# Not useful for the test cases
|
||||
"--disable-error-code=empty-body",
|
||||
]
|
||||
|
||||
if package.is_stdlib:
|
||||
|
||||
@@ -13,7 +13,6 @@ gettext.install
|
||||
gettext.translation
|
||||
importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
|
||||
importlib.abc.Finder.find_module
|
||||
importlib.metadata._meta.SimplePath.__truediv__ # See comments in the stub
|
||||
# platform.uname_result's processor field is now dynamically made to exist
|
||||
platform.uname_result.__match_args__
|
||||
platform.uname_result.__new__
|
||||
@@ -26,6 +25,10 @@ typing._SpecialForm.__mro_entries__
|
||||
weakref.ProxyType.__reversed__ # Doesn't really exist
|
||||
builtins.ellipsis # type is not exposed anywhere
|
||||
|
||||
# Runtime definition of protocol is incorrect
|
||||
importlib.metadata._meta.SimplePath.__truediv__
|
||||
importlib.metadata._meta.SimplePath.joinpath
|
||||
|
||||
# Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
ctypes.test
|
||||
ctypes\.test\..+
|
||||
|
||||
@@ -18,6 +18,10 @@ tkinter._VersionInfoType.__doc__
|
||||
typing.NewType.__mro_entries__
|
||||
builtins.ellipsis # type is not exposed anywhere
|
||||
|
||||
# Runtime definition of protocol is incorrect
|
||||
importlib.metadata._meta.SimplePath.__truediv__
|
||||
importlib.metadata._meta.SimplePath.joinpath
|
||||
|
||||
# Modules that exist at runtime, but shouldn't be added to typeshed
|
||||
ctypes.test
|
||||
ctypes\.test\..+
|
||||
|
||||
@@ -75,6 +75,7 @@ types.GenericAlias.__getattr__
|
||||
types.GenericAlias.__mro_entries__
|
||||
sys._monitoring # Doesn't really exist. See comments in the stub.
|
||||
weakref.ProxyType.__reversed__ # Doesn't really exist
|
||||
importlib.metadata._meta.SimplePath.joinpath # Incorrect runtime definition
|
||||
|
||||
# sys attributes that are not always defined
|
||||
sys.last_exc
|
||||
|
||||
Reference in New Issue
Block a user