Skip to content

Commit 097581e

Browse files
authored
Update to mypy 1.14 (#13272)
1 parent 8e31597 commit 097581e

File tree

43 files changed

+357
-79
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+357
-79
lines changed

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Type checkers that we test our stubs against. These should always
22
# be pinned to a specific version to make failure reproducible.
3-
mypy==1.13.0
3+
mypy==1.14.0
44
pyright==1.1.389
55
# pytype can be installed on Windows, but requires building wheels, let's not do that on the CI
66
pytype==2024.10.11; platform_system != "Windows" and python_version >= "3.10" and python_version < "3.13"

stdlib/@tests/stubtest_allowlists/common.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _collections_abc.AsyncGenerator.ag_await
88
_collections_abc.AsyncGenerator.ag_code
99
_collections_abc.AsyncGenerator.ag_frame
1010
_collections_abc.AsyncGenerator.ag_running
11+
asyncio.__all__
1112
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
1213
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
1314
builtins.dict.get

stubs/PyYAML/@tests/stubtest_allowlist.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# TODO: missing from stub
2+
yaml.composer.__all__
3+
yaml.constructor.__all__
4+
yaml.dumper.__all__
5+
yaml.emitter.__all__
6+
yaml.error.__all__
7+
yaml.loader.__all__
8+
yaml.parser.__all__
9+
yaml.reader.__all__
10+
yaml.representer.__all__
11+
yaml.resolver.__all__
12+
yaml.scanner.__all__
13+
yaml.serializer.__all__
14+
115
# yaml._yaml is for backwards compatibility so none of it matters anyway
216
yaml._yaml.__test__
317

stubs/WTForms/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# TODO: missing from stub
2+
wtforms.form.__all__
3+
14
# Error: is not present at runtime
25
# =============================
36
# This is hack to get around Field.__new__ not being able to return

stubs/WebOb/@tests/stubtest_allowlist.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# TODO: missing from stub
2+
webob.__all__
3+
webob.byterange.__all__
4+
webob.client.__all__
5+
webob.cookies.__all__
6+
webob.datetime_utils.__all__
7+
webob.dec.__all__
8+
webob.etag.__all__
9+
webob.exc.__all__
10+
webob.headers.__all__
11+
webob.multidict.__all__
12+
webob.request.__all__
13+
webob.response.__all__
14+
webob.static.__all__
15+
116
# Error: is not present in stub
217
# =============================
318
# These are plain strings, regex strings or compiled regex patterns

stubs/aiofiles/@tests/stubtest_allowlist.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# TODO: missing from stub
2+
aiofiles.__all__
3+
aiofiles.tempfile.__all__
4+
aiofiles.threadpool.__all__
5+
16
# These all delegate using *args,**kwargs, but stubs use signature of
27
# method they are being delegated to.
38
aiofiles.threadpool.binary.AsyncBufferedIOBase.close
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1+
# TODO: missing from stub
2+
boltons.debugutils.__all__
3+
boltons.dictutils.__all__
4+
boltons.excutils.__all__
5+
boltons.fileutils.__all__
6+
boltons.formatutils.__all__
7+
boltons.gcutils.__all__
8+
boltons.jsonutils.__all__
9+
boltons.listutils.__all__
10+
boltons.namedutils.__all__
11+
boltons.pathutils.__all__
12+
boltons.queueutils.__all__
13+
boltons.setutils.__all__
14+
boltons.strutils.__all__
15+
boltons.tableutils.__all__
16+
boltons.tbutils.__all__
17+
118
boltons.funcutils.CachedInstancePartial.__partialmethod__
219
boltons.funcutils.InstancePartial.__partialmethod__

stubs/cffi/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# TODO: missing from stub
2+
cffi.__all__
3+
14
# added dynamically and not detected by stubtest
25
cffi.(api.)?FFI.CData
36
cffi.(api.)?FFI.CType
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# TODO: missing from stub
2+
click_default_group.__all__
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# TODO: missing from stub
2+
consolemenu.__all__
3+
consolemenu.format.__all__
4+
consolemenu.items.__all__
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
# TODO: missing from stub
2+
editdistance.__all__
3+
14
# Not public API -- the submodule is an implementation detail due to it being a cythonized package
25
editdistance.bycython

stubs/fpdf2/fpdf/enums.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ class SignatureFlag(IntEnum):
88
SIGNATURES_EXIST = 1
99
APPEND_ONLY = 2
1010

11-
class CoerciveEnum(Enum):
11+
class CoerciveEnum(Enum): # type: ignore[misc] # Enum with no members
1212
@classmethod
1313
def coerce(cls, value: Self | str) -> Self: ...
1414

15-
class CoerciveIntEnum(IntEnum):
15+
class CoerciveIntEnum(IntEnum): # type: ignore[misc] # Enum with no members
1616
@classmethod
1717
def coerce(cls, value: Self | str | int) -> Self: ...
1818

19-
class CoerciveIntFlag(IntFlag):
19+
class CoerciveIntFlag(IntFlag): # type: ignore[misc] # Enum with no members
2020
@classmethod
2121
def coerce(cls, value: Self | str | int) -> Self: ...
2222

stubs/gevent/@tests/stubtest_allowlist.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
# TODO: missing from stub
2+
gevent._abstract_linkable.__all__
3+
gevent._ffi.loop.__all__
4+
gevent._ffi.watcher.__all__
5+
gevent._greenlet_primitives.__all__
6+
gevent._ident.__all__
7+
gevent._imap.__all__
8+
gevent.backdoor.__all__
9+
gevent.baseserver.__all__
10+
gevent.event.__all__
11+
gevent.events.__all__
12+
gevent.exceptions.__all__
13+
gevent.fileobject.__all__
14+
gevent.greenlet.__all__
15+
gevent.hub.__all__
16+
gevent.libev.__all__
17+
gevent.libev.corecext.__all__
18+
gevent.libuv.__all__
19+
gevent.libuv.loop.__all__
20+
gevent.libuv.watcher.__all__
21+
gevent.local.__all__
22+
gevent.monkey.__all__
23+
gevent.os.__all__
24+
gevent.resolver.__all__
25+
gevent.resolver.blocking.__all__
26+
gevent.resolver.dnspython.__all__
27+
gevent.resolver.thread.__all__
28+
gevent.resolver_thread.__all__
29+
gevent.server.__all__
30+
gevent.signal.__all__
31+
gevent.socket.__all__
32+
gevent.ssl.__all__
33+
gevent.subprocess.__all__
34+
gevent.threadpool.__all__
35+
gevent.timeout.__all__
36+
gevent.util.__all__
37+
gevent.win32util.__all__
38+
139
# Error: failed to find stubs
240
# =============================
341
# testing modules are not included in type stubs

stubs/gevent/@tests/stubtest_allowlist_darwin.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# TODO: missing from stub
2+
gevent.ares.__all__
3+
gevent.libev.corecffi.__all__
4+
gevent.resolver.ares.__all__
5+
gevent.resolver_ares.__all__
6+
17
# Error: is not present in stub
28
# =============================
39
# internal API stuff we dropped because it wasn't necessary

stubs/gevent/@tests/stubtest_allowlist_linux.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# TODO: missing from stub
2+
gevent.ares.__all__
3+
gevent.libev.corecffi.__all__
4+
gevent.resolver.ares.__all__
5+
gevent.resolver_ares.__all__
6+
17
# Error: is not present in stub
28
# =============================
39
# internal API stuff we dropped because it wasn't necessary

stubs/greenlet/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# TODO: missing from stub
2+
greenlet.__all__
3+
14
# Error: is not present in stub
25
# =============================
36
# this module only contains C code and exports no Python code, so it's better

stubs/hdbcli/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# TODO: missing from stub
2+
hdbcli.__all__
3+
14
# Are set to `None` by default, initialized later:
25
hdbcli.dbapi.Error.errorcode
36
hdbcli.dbapi.Error.errortext
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
# TODO: missing from stub
2+
httplib2.__all__
3+
14
# __getattr__() replaced with actual field in stub
25
httplib2.Response.dict

stubs/humanfriendly/@tests/stubtest_allowlist.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# TODO: missing from stub
2+
humanfriendly.__all__
3+
humanfriendly.case.__all__
4+
humanfriendly.cli.__all__
5+
humanfriendly.compat.__all__
6+
humanfriendly.decorators.__all__
7+
humanfriendly.deprecation.__all__
8+
humanfriendly.prompts.__all__
9+
humanfriendly.sphinx.__all__
10+
humanfriendly.tables.__all__
11+
humanfriendly.terminal.__all__
12+
humanfriendly.terminal.html.__all__
13+
humanfriendly.terminal.spinners.__all__
14+
humanfriendly.testing.__all__
15+
humanfriendly.text.__all__
16+
humanfriendly.usage.__all__
17+
118
# Re-exports:
219
humanfriendly.usage.import_module
320
humanfriendly.compat.which
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# TODO: missing from stub
2+
influxdb_client.extras.__all__

stubs/jwcrypto/jwcrypto/jwk.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ priv_bytes: Incomplete
2929
JWKTypesRegistry: Incomplete
3030

3131
class ParmType(Enum):
32-
name: str
33-
b64: str
34-
b64u: str
35-
unsupported: str
32+
name = "A string with a name" # pyright: ignore[reportAssignmentType]
33+
b64 = "Base64url Encoded"
34+
b64u = "Base64urlUint Encoded"
35+
unsupported = "Unsupported Parameter"
3636

3737
class JWKParameter(NamedTuple):
3838
description: Incomplete

stubs/libsass/@tests/stubtest_allowlist.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# TODO: missing from stub
2+
sassutils.builder.__all__
3+
sassutils.distutils.__all__
4+
sassutils.wsgi.__all__
5+
sass.__all__
6+
17
# Error: is not present in stub
28
# =============================
39
# These are only implemented for the purposes of emitting an error
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
# TODO: missing from stub
2+
MySQLdb.__all__
3+
MySQLdb.constants.__all__
4+
15
MySQLdb.Connection

stubs/passlib/@tests/stubtest_allowlist.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
# TODO: missing from stub
2+
passlib.apache.__all__
3+
passlib.context.__all__
4+
passlib.crypto._blowfish.__all__
5+
passlib.crypto._blowfish.base.__all__
6+
passlib.crypto._blowfish.unrolled.__all__
7+
passlib.crypto._md4.__all__
8+
passlib.crypto.digest.__all__
9+
passlib.crypto.scrypt.__all__
10+
passlib.crypto.scrypt._builtin.__all__
11+
passlib.handlers.argon2.__all__
12+
passlib.handlers.bcrypt.__all__
13+
passlib.handlers.cisco.__all__
14+
passlib.handlers.des_crypt.__all__
15+
passlib.handlers.digests.__all__
16+
passlib.handlers.django.__all__
17+
passlib.handlers.fshp.__all__
18+
passlib.handlers.md5_crypt.__all__
19+
passlib.handlers.misc.__all__
20+
passlib.handlers.mssql.__all__
21+
passlib.handlers.pbkdf2.__all__
22+
passlib.handlers.phpass.__all__
23+
passlib.handlers.postgres.__all__
24+
passlib.handlers.roundup.__all__
25+
passlib.handlers.scram.__all__
26+
passlib.handlers.scrypt.__all__
27+
passlib.handlers.sha1_crypt.__all__
28+
passlib.handlers.sha2_crypt.__all__
29+
passlib.handlers.sun_md5_crypt.__all__
30+
passlib.handlers.windows.__all__
31+
passlib.hosts.__all__
32+
passlib.ifc.__all__
33+
passlib.pwd.__all__
34+
passlib.registry.__all__
35+
passlib.totp.__all__
36+
passlib.utils.binary.__all__
37+
passlib.utils.decor.__all__
38+
passlib.utils.handlers.__all__
39+
passlib.utils.md4.__all__
40+
passlib.utils.pbkdf2.__all__
41+
passlib.win32.__all__
42+
143
# proxy module that uses some import magic incompatible with stubtest
244
passlib.hash
345

stubs/peewee/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# TODO: missing from stub
2+
peewee.__all__
3+
14
# Stubtest doesn't recognize __ as indicating positional-only arg at runtime
25
# https://github.com/python/mypy/issues/15302
36
peewee.Model.insert
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# TODO: missing from stub
2+
polib.__all__

stubs/psutil/@tests/stubtest_allowlist.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# TODO: missing from stub
2+
psutil.__all__
3+
psutil._common.__all__
4+
psutil._compat.__all__
5+
psutil._psposix.__all__
6+
17
# These super() dunders don't seem to be particularly useful,
28
# and having them pop up on autocomplete suggestions would be annoying
39
psutil._compat.super.__self__

0 commit comments

Comments
 (0)