Bump mypy to 0.981 (#8796)

This commit is contained in:
Alex Waygood
2022-09-27 01:14:33 +01:00
committed by GitHub
parent 9abe56a19a
commit 48e76e8a56
29 changed files with 23 additions and 185 deletions

View File

@@ -1,4 +1,2 @@
# yaml._yaml is for backwards compatibility so none of it matters anyway
yaml._yaml.CEmitter.__pyx_vtable__
yaml._yaml.CParser.__pyx_vtable__
yaml._yaml.__test__

View File

@@ -14,10 +14,7 @@ sqlalchemy.ext.declarative.as_declarative
sqlalchemy.orm.collections.InstrumentedList.*
sqlalchemy.orm.collections.InstrumentedSet.*
sqlalchemy.orm.collections.MappedCollection.*
sqlalchemy.util.OrderedDict.get
sqlalchemy.util.StringIO.*
sqlalchemy.util.byte_buffer.*
sqlalchemy.util.column_dict.get
# method arguments starting with double underscores in the implementation
sqlalchemy.testing.resolve_lambda

View File

@@ -9,12 +9,6 @@ cffi.(api.)?FFI.buffer
# Exists at runtime, but missing from stubs
cffi.vengine_cpy.__warningregistry__
# Alias to io.StringIO, which has the same allowlist
cffi.recompiler.NativeIO.seek
cffi.recompiler.NativeIO.truncate
cffi.verifier.NativeIO.seek
cffi.verifier.NativeIO.truncate
# Unnecessary re-exports
cffi.cparser.COMMON_TYPES
cffi.verifier.__version_verifier_modules__

View File

@@ -2,7 +2,3 @@ hdbcli.dbapi.Error.errorcode
hdbcli.dbapi.Error.errortext
hdbcli.dbapi.Warning.errorcode
hdbcli.dbapi.Warning.errortext
# Similar issues to builtins.memoryview
hdbcli.dbapi.BINARY.__iter__
hdbcli.dbapi.BINARY.cast
hdbcli.dbapi.BINARY.__contains__

View File

@@ -1,3 +0,0 @@
# Misnamed first argument in implementation
html5lib._inputstream.EncodingBytes.__new__
html5lib._tokenizer.attributeMap.get

View File

@@ -72,7 +72,7 @@ class HTMLBinaryInputStream(HTMLUnicodeInputStream):
def detectEncodingMeta(self): ...
class EncodingBytes(bytes):
def __new__(cls, value): ...
def __new__(self, value): ...
def __init__(self, value) -> None: ...
def __iter__(self): ...
def __next__(self): ...

View File

@@ -1,2 +0,0 @@
# TODO: remove _FormatCheckCallable when mypy 0.980 is released
jsonschema._format._FormatCheckCallable

View File

@@ -4,14 +4,5 @@ keyboard._keyboard_event.KeyboardEvent.scan_code
# Defaults don't align with possible values
keyboard.mouse.on_button
keyboard.mouse.wait
# Private modules and tests
# TODO: Should this be allowlisted?
keyboard.__main__
keyboard._darwinkeyboard
keyboard._darwinmouse
keyboard._keyboard_tests
keyboard._mouse_tests
keyboard._nixcommon
keyboard._nixkeyboard
keyboard._nixmouse
keyboard._winkeyboard
keyboard._winmouse

View File

@@ -36,7 +36,3 @@ PyInstaller.utils.osx
PyInstaller.utils.run_tests
PyInstaller.utils.tests
PyInstaller.utils.win32.*
# Explicitly private implementation details
PyInstaller\._.*
PyInstaller.isolated._child
PyInstaller.utils._gitrevision

View File

@@ -1,21 +1,6 @@
redis.client.Pipeline.transaction # instance attribute has same name as superclass method
redis.ocsp # requires cryptography to be installed
# TypeAlias-related problems
redis.asyncio.client.CommandStackT
redis.asyncio.client.CommandT
redis.asyncio.client.PubSubHandler
redis.asyncio.connection.ExceptionMappingT
# Protocol-related problems
redis.asyncio.client.AsyncPubsubWorkerExceptionHandler.__init__
redis.asyncio.client.AsyncResponseCallbackProtocol.__init__
redis.asyncio.client.PubsubWorkerExceptionHandler.__init__
redis.asyncio.client.ResponseCallbackProtocol.__init__
redis.asyncio.connection.AsyncConnectCallbackProtocol.__init__
redis.asyncio.connection.ConnectCallbackProtocol.__init__
redis.typing.CommandsProtocol.__init__
# async def mismatch problems
redis.asyncio.client.Pipeline.command_info
redis.asyncio.client.Pipeline.debug_segfault
@@ -25,8 +10,6 @@ redis.asyncio.client.Pipeline.script_debug
redis.asyncio.client.Pipeline.shutdown
# unclear problems
redis.Sentinel.master_for
redis.Sentinel.slave_for
redis.asyncio.Sentinel.master_for
redis.asyncio.Sentinel.slave_for
redis.asyncio.sentinel.Sentinel.master_for

View File

@@ -21,5 +21,4 @@ six.viewkeys
six.viewvalues
# Unclear problems
six.Iterator.__init__
six.callable

View File

@@ -13,7 +13,9 @@ def logging_redirect_tqdm(
) -> _GeneratorContextManager[None]: ...
# TODO type *args, **kwargs here more precisely
# The type ignore is because mypy complains that the second overload will never be matched
# (I'm not sure that's true)
@overload
def tqdm_logging_redirect(*args, tqdm_class: Callable[..., _TqdmT], **kwargs) -> _GeneratorContextManager[_TqdmT]: ...
@overload
def tqdm_logging_redirect(*args, **kwargs) -> _GeneratorContextManager[std_tqdm[Incomplete]]: ...
def tqdm_logging_redirect(*args, **kwargs) -> _GeneratorContextManager[std_tqdm[Incomplete]]: ... # type: ignore[misc]

View File

@@ -1,15 +1,4 @@
# TODO: remove ResponseCls ignore when https://github.com/python/mypy/issues/13316 is closed
urllib3.HTTPConnectionPool.ResponseCls
urllib3.HTTPConnectionPool.__init__
urllib3.HTTPConnectionPool.urlopen
urllib3.HTTPSConnectionPool.__init__
urllib3.NullHandler
urllib3.PoolManager.connection_from_host
urllib3.PoolManager.connection_from_url
urllib3.PoolManager.urlopen
urllib3.ProxyManager.__init__
urllib3.ProxyManager.connection_from_host
urllib3.ProxyManager.urlopen
urllib3._collections.HTTPHeaderDict.from_httplib
urllib3._collections.HTTPHeaderDict.getlist
urllib3._collections.RLock
@@ -18,14 +7,11 @@ urllib3.connection.HTTPSConnection.__init__
urllib3.connection.VerifiedHTTPSConnection.__init__
urllib3.connection.VerifiedHTTPSConnection.set_cert
urllib3.connectionpool.ConnectionError
urllib3.connectionpool.HTTPConnection.request
# TODO: remove ResponseCls ignore when https://github.com/python/mypy/issues/13316 is closed
urllib3.connectionpool.HTTPConnectionPool.ResponseCls
urllib3.connectionpool.HTTPConnectionPool.__init__
urllib3.connectionpool.HTTPConnectionPool.urlopen
urllib3.connectionpool.HTTPSConnection.__init__
urllib3.connectionpool.HTTPSConnectionPool.__init__
urllib3.connectionpool.RequestMethods.request_encode_url
urllib3.connectionpool.VerifiedHTTPSConnection.__init__
urllib3.connectionpool.VerifiedHTTPSConnection.set_cert
urllib3.packages.ssl_match_hostname

View File

@@ -1 +0,0 @@
xxhash._xxhash