Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 48e76e8

Browse files
authored
Bump mypy to 0.981 (#8796)
1 parent 9abe56a commit 48e76e8

29 files changed

Lines changed: 23 additions & 185 deletions

File tree

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ flake8-bugbear==22.7.1 # must match .pre-commit-config.yaml
55
flake8-noqa==1.2.9 # must match .pre-commit-config.yaml
66
flake8-pyi==22.8.2 # must match .pre-commit-config.yaml
77
isort==5.10.1 # must match .pre-commit-config.yaml
8-
mypy==0.971
8+
mypy==0.981
99
packaging==21.3
1010
pycln==2.1.1 # must match .pre-commit-config.yaml
1111
pyyaml==6.0

stdlib/builtins.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,7 @@ if sys.version_info >= (3, 11):
19521952
@overload
19531953
def subgroup(self: Self, __condition: Callable[[_BaseExceptionT_co], bool]) -> Self | None: ...
19541954
@overload
1955-
def split(
1955+
def split( # type: ignore[misc] # complaints about overlapping overloads
19561956
self: Self, __condition: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...]
19571957
) -> tuple[BaseExceptionGroup[_BaseExceptionT] | None, Self | None]: ...
19581958
@overload
@@ -1972,7 +1972,7 @@ if sys.version_info >= (3, 11):
19721972
@overload
19731973
def subgroup(self: Self, __condition: Callable[[_ExceptionT_co], bool]) -> Self | None: ...
19741974
@overload # type: ignore[override]
1975-
def split(
1975+
def split( # type: ignore[misc] # complaints about overlapping overloads
19761976
self: Self, __condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...]
19771977
) -> tuple[ExceptionGroup[_ExceptionT] | None, Self | None]: ...
19781978
@overload

stdlib/importlib/metadata/__init__.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ class _EntryPointBase(NamedTuple):
4141

4242
class EntryPoint(_EntryPointBase):
4343
pattern: ClassVar[Pattern[str]]
44+
if sys.version_info >= (3, 11):
45+
def __init__(self, name: str, value: str, group: str) -> None: ...
46+
4447
def load(self) -> Any: ... # Callable[[], Any] or an importable module
4548
@property
4649
def extras(self) -> list[str]: ...
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
# yaml._yaml is for backwards compatibility so none of it matters anyway
2-
yaml._yaml.CEmitter.__pyx_vtable__
3-
yaml._yaml.CParser.__pyx_vtable__
42
yaml._yaml.__test__

stubs/SQLAlchemy/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ sqlalchemy.ext.declarative.as_declarative
1414
sqlalchemy.orm.collections.InstrumentedList.*
1515
sqlalchemy.orm.collections.InstrumentedSet.*
1616
sqlalchemy.orm.collections.MappedCollection.*
17-
sqlalchemy.util.OrderedDict.get
1817
sqlalchemy.util.StringIO.*
19-
sqlalchemy.util.byte_buffer.*
20-
sqlalchemy.util.column_dict.get
2118

2219
# method arguments starting with double underscores in the implementation
2320
sqlalchemy.testing.resolve_lambda

stubs/cffi/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ cffi.(api.)?FFI.buffer
99
# Exists at runtime, but missing from stubs
1010
cffi.vengine_cpy.__warningregistry__
1111

12-
# Alias to io.StringIO, which has the same allowlist
13-
cffi.recompiler.NativeIO.seek
14-
cffi.recompiler.NativeIO.truncate
15-
cffi.verifier.NativeIO.seek
16-
cffi.verifier.NativeIO.truncate
17-
1812
# Unnecessary re-exports
1913
cffi.cparser.COMMON_TYPES
2014
cffi.verifier.__version_verifier_modules__

stubs/hdbcli/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,3 @@ hdbcli.dbapi.Error.errorcode
22
hdbcli.dbapi.Error.errortext
33
hdbcli.dbapi.Warning.errorcode
44
hdbcli.dbapi.Warning.errortext
5-
# Similar issues to builtins.memoryview
6-
hdbcli.dbapi.BINARY.__iter__
7-
hdbcli.dbapi.BINARY.cast
8-
hdbcli.dbapi.BINARY.__contains__

stubs/html5lib/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

stubs/html5lib/html5lib/_inputstream.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class HTMLBinaryInputStream(HTMLUnicodeInputStream):
7272
def detectEncodingMeta(self): ...
7373

7474
class EncodingBytes(bytes):
75-
def __new__(cls, value): ...
75+
def __new__(self, value): ...
7676
def __init__(self, value) -> None: ...
7777
def __iter__(self): ...
7878
def __next__(self): ...

stubs/jsonschema/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)