mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
Update mypy to 1.18.1 (#14699)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Type checkers that we test our stubs against. These should always
|
||||
# be pinned to a specific version to make failure reproducible.
|
||||
mypy==1.17.1
|
||||
mypy==1.18.1
|
||||
pyright==1.1.405
|
||||
|
||||
# Libraries used by our various scripts.
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
# TODO: check these entries
|
||||
authlib.jose.drafts._jwe_enc_cryptodome
|
||||
authlib.oauth2.OAuth2Client.client_auth_class
|
||||
authlib.oauth2.OAuth2Client.oauth_error_class
|
||||
authlib.oauth2.OAuth2Client.token_auth_class
|
||||
authlib.oauth2.client.OAuth2Client.client_auth_class
|
||||
authlib.oauth2.client.OAuth2Client.oauth_error_class
|
||||
authlib.oauth2.client.OAuth2Client.token_auth_class
|
||||
authlib.oauth2.rfc7521.AssertionClient.oauth_error_class
|
||||
authlib.oauth2.rfc7521.client.AssertionClient.oauth_error_class
|
||||
authlib.oauth2.rfc7523.JWTBearerTokenValidator.token_cls
|
||||
authlib.oauth2.rfc7523.validator.JWTBearerTokenValidator.token_cls
|
||||
|
||||
# Are set to `None` by default, initialized later:
|
||||
authlib.jose.drafts._jwe_algorithms.ECDH1PUAlgorithm.description
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# DictCursorMixin changes method types of inherited classes, but doesn't contain much at runtime
|
||||
pymysql.cursors.DictCursorMixin.__iter__
|
||||
pymysql.cursors.DictCursorMixin.fetch[a-z]*
|
||||
|
||||
# FIXME: new stubtest errors from mypy v1.18.1 that need to be looked at more closely.
|
||||
# See https://github.com/python/typeshed/pull/14699
|
||||
pymysql.connections.Connection.__init__
|
||||
|
||||
@@ -3,7 +3,7 @@ import types
|
||||
from _typeshed import Incomplete, ReadableBuffer, WriteableBuffer
|
||||
from collections.abc import Callable, Hashable
|
||||
from typing import Any, ClassVar, Literal, Protocol, SupportsIndex, TypeVar, final, overload, type_check_only
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -92,7 +92,7 @@ class _CDataBase:
|
||||
@final
|
||||
class buffer:
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def __new__(cls, *args, **kwargs) -> Self: ...
|
||||
def __buffer__(self, flags: int, /) -> memoryview: ...
|
||||
def __delitem__(self, other, /) -> None: ...
|
||||
def __eq__(self, other, /): ...
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
# Iterator class attributes: Runtime behavior differs due to Django 5.0 compatibility logic in choice setters
|
||||
django_filters.fields.ChoiceField.iterator
|
||||
django_filters.fields.ModelChoiceField.iterator
|
||||
django_filters.fields.ModelMultipleChoiceField.iterator
|
||||
django_filters.fields.MultipleChoiceField.iterator
|
||||
|
||||
# Lookup NamedTuple: Parameter name mismatch between inferred stub and runtime
|
||||
django_filters.fields.Lookup.__new__
|
||||
django_filters.fields.Lookup.__doc__
|
||||
@@ -20,3 +14,7 @@ django_filters.fields.MultipleChoiceField.__init__
|
||||
django_filters.fields.RangeField.__init__
|
||||
django_filters.filters.QuerySetRequestMixin.__init__
|
||||
django_filters.widgets.CSVWidget.__init__
|
||||
|
||||
# FIXME: new stubtest errors from mypy v1.18.1 that need to be looked at more closely.
|
||||
# See https://github.com/python/typeshed/pull/14699
|
||||
django_filters(\.\w+)*\.OrderingFilter.field_class
|
||||
|
||||
@@ -36,3 +36,9 @@ docutils.readers.TYPE_CHECKING
|
||||
docutils.utils.TYPE_CHECKING
|
||||
docutils.writers.TYPE_CHECKING
|
||||
docutils.writers._html_base.TYPE_CHECKING
|
||||
|
||||
# FIXME: new stubtest errors from mypy v1.18.1 that need to be looked at more closely.
|
||||
# See https://github.com/python/typeshed/pull/14699
|
||||
docutils\.nodes\.\w+\.content_model
|
||||
docutils.parsers.docutils_xml.Unknown.content_model
|
||||
docutils.transforms.universal.SmartQuotes.nodes_to_skip
|
||||
|
||||
@@ -112,7 +112,6 @@ class Text(Node, str):
|
||||
|
||||
# we omit the rawsource parameter because it has been deprecated and is ignored
|
||||
def __new__(cls, data: str) -> Self: ...
|
||||
def __init__(self, data: str) -> None: ...
|
||||
def shortrepr(self, maxlen: int = 18) -> str: ...
|
||||
def copy(self) -> Self: ...
|
||||
def deepcopy(self) -> Self: ...
|
||||
|
||||
@@ -11,7 +11,7 @@ class local:
|
||||
"_local_type",
|
||||
"_local_type_set_or_del_descriptors",
|
||||
)
|
||||
def __init__(self, *args: object, **kwargs: object) -> None: ...
|
||||
def __new__(cls, *args: object, **kwargs: object) -> Self: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
def __getattribute__(self, name: str, /) -> Any: ...
|
||||
def __delattr__(self, name: str, /) -> None: ...
|
||||
|
||||
@@ -248,14 +248,14 @@ class ServicerContext(Generic[_TRequest, _TResponse], metaclass=abc.ABCMeta):
|
||||
# Client-Side Interceptor:
|
||||
|
||||
class ClientCallDetails(abc.ABC):
|
||||
def __init__(
|
||||
self,
|
||||
def __new__(
|
||||
_cls,
|
||||
method: str,
|
||||
timeout: float | None,
|
||||
metadata: Metadata | None,
|
||||
credentials: CallCredentials | None,
|
||||
wait_for_ready: bool | None,
|
||||
) -> None: ...
|
||||
) -> Self: ...
|
||||
|
||||
method: str
|
||||
timeout: float | None
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# stubtest does not understand that the adapter argument type is an adapter and not abc.ABC
|
||||
hvac.Client.__init__
|
||||
hvac.v1.Client.__init__
|
||||
@@ -13,12 +13,3 @@ icalendar.cal.Component.set_inline
|
||||
# Stubtest gets confused by multiple inheritance.
|
||||
icalendar.prop.vSkip.__new__
|
||||
icalendar.vSkip.__new__
|
||||
|
||||
# Stubtest incorrectly reports that stub argument "cls" should be
|
||||
# positional or keyword.
|
||||
icalendar.vBoolean.__new__
|
||||
icalendar.vFloat.__new__
|
||||
icalendar.vInt.__new__
|
||||
icalendar.prop.vBoolean.__new__
|
||||
icalendar.prop.vFloat.__new__
|
||||
icalendar.prop.vInt.__new__
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import MaybeNone
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import Any, Final, Generic, TypeVar, type_check_only
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"LUA_VERSION",
|
||||
@@ -78,7 +78,7 @@ class LuaRuntime:
|
||||
lua_implementation: Final[str]
|
||||
lua_version: Final[tuple[int, int]]
|
||||
|
||||
def __init__(self, /, unpack_returned_tuples: bool) -> None: ...
|
||||
def __new__(cls, /, unpack_returned_tuples: bool) -> Self: ...
|
||||
# def add_pending_unref(self, ref: int) -> None: ...
|
||||
# def clean_up_pending_unrefs(self) -> int: ...
|
||||
def get_max_memory(self, total: bool = False) -> int | MaybeNone: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import MaybeNone
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import Any, Final, Generic, TypeVar, type_check_only
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"LUA_VERSION",
|
||||
@@ -78,7 +78,7 @@ class LuaRuntime:
|
||||
lua_implementation: Final[str]
|
||||
lua_version: Final[tuple[int, int]]
|
||||
|
||||
def __init__(self, /, unpack_returned_tuples: bool) -> None: ...
|
||||
def __new__(cls, /, unpack_returned_tuples: bool) -> Self: ...
|
||||
# def add_pending_unref(self, ref: int) -> None: ...
|
||||
# def clean_up_pending_unrefs(self) -> int: ...
|
||||
def get_max_memory(self, total: bool = False) -> int | MaybeNone: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import MaybeNone
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import Any, Final, Generic, TypeVar, type_check_only
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"LUA_VERSION",
|
||||
@@ -78,7 +78,7 @@ class LuaRuntime:
|
||||
lua_implementation: Final[str]
|
||||
lua_version: Final[tuple[int, int]]
|
||||
|
||||
def __init__(self, /, unpack_returned_tuples: bool) -> None: ...
|
||||
def __new__(cls, /, unpack_returned_tuples: bool) -> Self: ...
|
||||
# def add_pending_unref(self, ref: int) -> None: ...
|
||||
# def clean_up_pending_unrefs(self) -> int: ...
|
||||
def get_max_memory(self, total: bool = False) -> int | MaybeNone: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import MaybeNone
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import Any, Final, Generic, TypeVar, type_check_only
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"LUA_VERSION",
|
||||
@@ -78,7 +78,7 @@ class LuaRuntime:
|
||||
lua_implementation: Final[str]
|
||||
lua_version: Final[tuple[int, int]]
|
||||
|
||||
def __init__(self, /, unpack_returned_tuples: bool) -> None: ...
|
||||
def __new__(cls, /, unpack_returned_tuples: bool) -> Self: ...
|
||||
# def add_pending_unref(self, ref: int) -> None: ...
|
||||
# def clean_up_pending_unrefs(self) -> int: ...
|
||||
def get_max_memory(self, total: bool = False) -> int | MaybeNone: ...
|
||||
|
||||
@@ -37,6 +37,3 @@ networkx\._typing
|
||||
# "..._DT is not present at runtime" but we don't set it in stubs, I don't understand this one
|
||||
networkx(\.algorithms)?(\.tree)?(\.mst)?\.SpanningTreeIterator\.Partition\._DT
|
||||
networkx(\.algorithms)?(\.tree)?(\.branchings)?\.ArborescenceIterator\.Partition\._DT
|
||||
|
||||
# variable differs from runtime type abc.ABCMeta
|
||||
networkx\.classes\.reportviews\.\w*EdgeView\.dataview
|
||||
|
||||
@@ -26,14 +26,6 @@ openpyxl.descriptors.nested.NestedMinMax.__get__
|
||||
openpyxl.descriptors.nested.NestedText.__get__
|
||||
openpyxl.descriptors.nested.NestedValue.__get__
|
||||
|
||||
# Stubtest sees <class T> and type[T] as different: https://github.com/python/mypy/issues/13316
|
||||
openpyxl.chart.descriptors.NumberFormatDescriptor.expected_type
|
||||
openpyxl.chart.title.TitleDescriptor.expected_type
|
||||
openpyxl.drawing.colors.ColorChoiceDescriptor.expected_type
|
||||
openpyxl.packaging.relationship.RelationshipList.expected_type
|
||||
openpyxl.styles.colors.ColorDescriptor.expected_type
|
||||
openpyxl.styles.fills.StopList.expected_type
|
||||
|
||||
# Stubtest doesn't like generics here
|
||||
openpyxl\.descriptors\.(base\.)?Bool\.allow_none
|
||||
openpyxl\.descriptors\.(base\.)?DateTime\.allow_none
|
||||
@@ -195,3 +187,7 @@ openpyxl.worksheet.smart_tag.CellSmartTagPr.__init__
|
||||
openpyxl.worksheet.smart_tag.CellSmartTags.__init__
|
||||
openpyxl.worksheet.table.TableColumn.__init__
|
||||
openpyxl.worksheet.table.XMLColumnProps.__init__
|
||||
|
||||
# FIXME: new stubtest errors from mypy v1.18.1 that need to be looked at more closely.
|
||||
# See https://github.com/python/typeshed/pull/14699
|
||||
openpyxl.descriptors.sequence.UniqueSequence.seq_types
|
||||
|
||||
@@ -31,7 +31,6 @@ class StyleArray(array[int]):
|
||||
quotePrefix: ArrayDescriptor[int]
|
||||
xfId: ArrayDescriptor[int]
|
||||
def __new__(cls, args: bytes | bytearray | Iterable[int] = [0, 0, 0, 0, 0, 0, 0, 0, 0]) -> Self: ...
|
||||
def __init__(self, args: bytes | bytearray | Iterable[int] = [0, 0, 0, 0, 0, 0, 0, 0, 0]) -> None: ...
|
||||
def __hash__(self) -> int: ... # type: ignore[override]
|
||||
def __copy__(self) -> StyleArray: ...
|
||||
def __deepcopy__(self, memo: Unused) -> StyleArray: ...
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
# Stubtest doesn't understand that a property alias is also read-only.
|
||||
# https://github.com/python/mypy/issues/6700
|
||||
pika(\.adapters)?(\.blocking_connection)?\.BlockingConnection\.basic_nack
|
||||
pika(\.adapters)?(\.blocking_connection)?\.BlockingConnection\.consumer_cancel_notify
|
||||
pika(\.adapters)?(\.blocking_connection)?\.BlockingConnection\.exchange_exchange_bindings
|
||||
pika(\.adapters)?(\.blocking_connection)?\.BlockingConnection\.publisher_confirms
|
||||
|
||||
# The implementation has defaults for the arguments that would make the
|
||||
# created instances unusable, so we require the arguments in the stub.
|
||||
pika.spec.Queue.DeclareOk.__init__
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import ClassVar, final
|
||||
from typing_extensions import Self
|
||||
|
||||
default_pool: DescriptorPool
|
||||
|
||||
@@ -28,14 +29,14 @@ class Descriptor:
|
||||
nested_types_by_name: Incomplete
|
||||
oneofs: Incomplete
|
||||
oneofs_by_name: Incomplete
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def CopyToProto(self, object, /): ...
|
||||
def EnumValueName(self, *args, **kwargs): ... # incomplete
|
||||
def GetOptions(self): ...
|
||||
|
||||
@final
|
||||
class DescriptorPool:
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def Add(self, object, /): ...
|
||||
def AddSerializedFile(self, object, /): ...
|
||||
def FindAllExtensions(self, object, /): ...
|
||||
@@ -62,7 +63,7 @@ class EnumDescriptor:
|
||||
values: Incomplete
|
||||
values_by_name: Incomplete
|
||||
values_by_number: Incomplete
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def CopyToProto(self, object, /): ...
|
||||
def GetOptions(self): ...
|
||||
|
||||
@@ -73,7 +74,7 @@ class EnumValueDescriptor:
|
||||
name: Incomplete
|
||||
number: Incomplete
|
||||
type: Incomplete
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def GetOptions(self): ...
|
||||
|
||||
@final
|
||||
@@ -151,7 +152,7 @@ class FieldDescriptor:
|
||||
name: Incomplete
|
||||
number: Incomplete
|
||||
type: Incomplete
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def GetOptions(self): ...
|
||||
|
||||
@final
|
||||
@@ -167,7 +168,7 @@ class FileDescriptor:
|
||||
public_dependencies: Incomplete
|
||||
serialized_pb: Incomplete
|
||||
services_by_name: Incomplete
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def CopyToProto(self, object, /): ...
|
||||
def GetOptions(self): ...
|
||||
|
||||
@@ -179,7 +180,7 @@ class MapIterator:
|
||||
@final
|
||||
class Message:
|
||||
Extensions: Incomplete
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete # incomplete
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def ByteSize(self): ...
|
||||
def Clear(self): ...
|
||||
def ClearExtension(self, object, /): ...
|
||||
@@ -225,7 +226,7 @@ class MethodDescriptor:
|
||||
name: Incomplete
|
||||
output_type: Incomplete
|
||||
server_streaming: Incomplete
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def CopyToProto(self, object, /): ...
|
||||
def GetOptions(self): ...
|
||||
|
||||
@@ -237,12 +238,12 @@ class OneofDescriptor:
|
||||
has_options: Incomplete
|
||||
index: Incomplete
|
||||
name: Incomplete
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def GetOptions(self): ...
|
||||
|
||||
@final
|
||||
class RepeatedCompositeContainer:
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def MergeFrom(self, object, /): ...
|
||||
def add(self, *args, **kwargs): ... # incomplete
|
||||
def append(self, object, /): ...
|
||||
@@ -266,7 +267,7 @@ class RepeatedCompositeContainer:
|
||||
|
||||
@final
|
||||
class RepeatedScalarContainer:
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def MergeFrom(self, object, /): ...
|
||||
def append(self, object, /): ...
|
||||
def extend(self, object, /): ...
|
||||
@@ -296,14 +297,14 @@ class ServiceDescriptor:
|
||||
methods: Incomplete
|
||||
methods_by_name: Incomplete
|
||||
name: Incomplete
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def CopyToProto(self, object, /): ...
|
||||
def FindMethodByName(self, object, /): ...
|
||||
def GetOptions(self): ...
|
||||
|
||||
@final
|
||||
class UnknownFieldSet:
|
||||
def __init__(self, *args, **kwargs) -> None: ... # incomplete
|
||||
def __new__(cls, *args, **kwargs) -> Self: ... # incomplete
|
||||
def __getitem__(self, index, /): ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
|
||||
@@ -43,4 +43,4 @@ class Message:
|
||||
def ClearField(self, field_name: Any) -> None: ...
|
||||
def WhichOneof(self, oneof_group: Any) -> Any: ...
|
||||
# TODO: check kwargs
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def __new__(cls, *args, **kwargs) -> Self: ...
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# typeshed typing differences with runtime collections.OrderedDict and builtins.dict
|
||||
pyasn1.codec.native.encoder.SequenceEncoder.protoDict
|
||||
pyasn1.codec.native.encoder.SetEncoder.protoDict
|
||||
@@ -10,3 +10,7 @@ serial.tools.list_ports_posix # Posix only
|
||||
# io.RawIOBase but at runtime they are normal arguments that don't have consistent
|
||||
# names.
|
||||
serial.serialwin32.Serial.write
|
||||
|
||||
# FIXME: new stubtest errors from mypy v1.18.1 that need to be looked at more closely.
|
||||
# See https://github.com/python/typeshed/pull/14699
|
||||
serial.win32.ULONG_PTR
|
||||
|
||||
@@ -385,7 +385,7 @@ class PyCOMSTAT:
|
||||
|
||||
@final
|
||||
class PyCOORD:
|
||||
def __init__(self, X: int = ..., Y: int = ...) -> None: ...
|
||||
def __new__(self, X: int = ..., Y: int = ...) -> Self: ...
|
||||
X: int
|
||||
Y: int
|
||||
|
||||
@@ -573,7 +573,7 @@ class PyCTL_USAGE: ...
|
||||
|
||||
@final
|
||||
class PyConsoleScreenBuffer:
|
||||
def __init__(self, Handle) -> None: ...
|
||||
def __new__(self, Handle) -> Self: ...
|
||||
def SetConsoleActiveScreenBuffer(self) -> None: ...
|
||||
def GetConsoleCursorInfo(self) -> tuple[Incomplete, Incomplete]: ...
|
||||
def SetConsoleCursorInfo(self, Size, Visible) -> None: ...
|
||||
@@ -918,7 +918,7 @@ class PyHANDLE:
|
||||
|
||||
@final
|
||||
class PyHDESK:
|
||||
def __init__(self, handle) -> None: ...
|
||||
def __new__(self, handle) -> Self: ...
|
||||
def SetThreadDesktop(self) -> None: ...
|
||||
def EnumDesktopWindows(self) -> tuple[int, ...]: ...
|
||||
def SwitchDesktop(self) -> None: ...
|
||||
@@ -1056,7 +1056,7 @@ class PyHTHEME: ...
|
||||
|
||||
@final
|
||||
class PyHWINSTA:
|
||||
def __init__(self, handle) -> None: ...
|
||||
def __new__(self, handle) -> Self: ...
|
||||
def EnumDesktops(self) -> tuple[Incomplete, ...]: ...
|
||||
def SetProcessWindowStation(self) -> None: ...
|
||||
def CloseWindowStation(self) -> None: ...
|
||||
@@ -1069,7 +1069,7 @@ class PyIID: ...
|
||||
|
||||
@final
|
||||
class PyINPUT_RECORD:
|
||||
def __init__(self, EventType: int) -> None: ...
|
||||
def __new__(self, EventType: int) -> Self: ...
|
||||
EventType: int
|
||||
KeyDown: int | bool
|
||||
RepeatCount: int
|
||||
@@ -1628,7 +1628,7 @@ class PySIZE: ...
|
||||
|
||||
@final
|
||||
class PySMALL_RECT:
|
||||
def __init__(self, Left: int = ..., Top: int = ..., Right: int = ..., Bottom: int = ...) -> None: ...
|
||||
def __new__(self, Left: int = ..., Top: int = ..., Right: int = ..., Bottom: int = ...) -> Self: ...
|
||||
Left: int
|
||||
Top: int
|
||||
Right: int
|
||||
@@ -1651,7 +1651,7 @@ class PySTARTUPINFO:
|
||||
lpTitle: str
|
||||
|
||||
class PySecBuffer:
|
||||
def __init__(self, BufferSize, BufferType) -> None: ...
|
||||
def __new__(self, BufferSize, BufferType) -> Self: ...
|
||||
@property
|
||||
def BufferType(self): ...
|
||||
@property
|
||||
@@ -1663,7 +1663,7 @@ class PySecBuffer:
|
||||
def Clear(self) -> None: ...
|
||||
|
||||
class PySecBufferDesc:
|
||||
def __init__(self, Version=...) -> None: ...
|
||||
def __new__(self, Version=...) -> Self: ...
|
||||
Version: Incomplete
|
||||
Buffer: Incomplete
|
||||
def append(self, buffer, /) -> None: ...
|
||||
@@ -4747,9 +4747,9 @@ class PyPROPERTYKEY: ...
|
||||
class PyPROPVARIANT:
|
||||
@overload
|
||||
@deprecated("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead")
|
||||
def __init__(self, Value: tuple[int, int], Type=...) -> None: ...
|
||||
def __new__(self, Value: tuple[int, int], Type=...) -> Self: ...
|
||||
@overload
|
||||
def __init__(self, Value, Type=...) -> None: ...
|
||||
def __new__(self, Value, Type=...) -> Self: ...
|
||||
@property
|
||||
def vt(self): ...
|
||||
def GetValue(self): ...
|
||||
|
||||
@@ -17,7 +17,7 @@ class error(Exception):
|
||||
class com_error(Exception): ...
|
||||
|
||||
class HANDLEType:
|
||||
def __init__(self, *args: Never) -> NoReturn: ...
|
||||
def __new__(self, *args: Never) -> NoReturn: ...
|
||||
@property
|
||||
def handle(self) -> int: ...
|
||||
def Close(self) -> None: ...
|
||||
|
||||
@@ -11,10 +11,6 @@ qrcode._types
|
||||
qrcode\.make
|
||||
qrcode\.main\.make
|
||||
|
||||
# Stubtest hiccup: It doesn't recognize that the annotated type is a base
|
||||
# class of the default class assigned to the attribute.
|
||||
qrcode\.image\..*\.default_drawer_class
|
||||
|
||||
# Implementation has marked these methods as abstract without the class
|
||||
# or its bases deriving from abc.ABCMeta
|
||||
qrcode\.image\.base\.BaseImage\.(drawrect|new_image|save)
|
||||
|
||||
@@ -57,13 +57,6 @@ reportlab.lib.utils.CIDict.setdefault
|
||||
# it doesn't actually accept arbitrary arguments
|
||||
reportlab.platypus.doctemplate.PTCycle.__new__
|
||||
|
||||
# type[Canvas] is a _CanvasMaker, for some reason stubtest trips up
|
||||
reportlab.platypus.BaseDocTemplate.build
|
||||
reportlab.platypus.SimpleDocTemplate.build
|
||||
reportlab.platypus.doctemplate.BaseDocTemplate.build
|
||||
reportlab.platypus.doctemplate.SimpleDocTemplate.build
|
||||
reportlab.platypus.tableofcontents.SimpleIndex.getCanvasMaker
|
||||
|
||||
|
||||
# Error: not present in stub
|
||||
# ==========================
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
seaborn._core.scales.(Pipeline|TransFuncs) # aliases defined in `if TYPE_CHECKING` block
|
||||
seaborn.external.docscrape.ClassDoc.__init__ # stubtest doesn't like ABC class as default value
|
||||
seaborn.external.docscrape.NumpyDocString.__str__ # weird signature
|
||||
|
||||
seaborn.axisgrid.Grid.tight_layout # the method doesn't really take pos args but runtime has *args
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from typing import Literal, SupportsIndex, final, overload
|
||||
from typing_extensions import Never
|
||||
from typing_extensions import Never, Self
|
||||
|
||||
import numpy as np
|
||||
from numpy.typing import NDArray
|
||||
@@ -154,7 +154,7 @@ class Geometry:
|
||||
@final
|
||||
class STRtree:
|
||||
count: int
|
||||
def __init__(self, geoms: NDArray[np.object_], node_capacity: SupportsIndex, /, **kwargs: object) -> None: ...
|
||||
def __new__(cls, geoms: NDArray[np.object_], node_capacity: SupportsIndex, /, **kwargs: object) -> Self: ...
|
||||
def dwithin(self, geoms: NDArray[np.object_], distances: NDArray[np.float64], /) -> NDArray[np.int64]: ...
|
||||
def nearest(self, geoms: NDArray[np.object_], /) -> NDArray[np.int64]: ...
|
||||
def query(self, geoms: NDArray[np.object_], predicate: SupportsIndex, /) -> NDArray[np.int64]: ...
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import Final
|
||||
from typing_extensions import Self
|
||||
|
||||
from .book import Book, Name
|
||||
from .timemachine import *
|
||||
@@ -64,8 +63,9 @@ class Ref3D(tuple[int, int, int, int, int, int, int, int, int, int, int, int]):
|
||||
rowxhi: int
|
||||
colxlo: int
|
||||
colxhi: int
|
||||
def __new__(cls, atuple: tuple[int, int, int, int, int, int, int, int, int, int, int, int]) -> Self: ...
|
||||
def __init__(self, atuple: tuple[int, int, int, int, int, int, int, int, int, int, int, int]) -> None: ...
|
||||
def __init__( # pyright: ignore[reportInconsistentConstructor]
|
||||
self, atuple: tuple[int, int, int, int, int, int, int, int, int, int, int, int]
|
||||
) -> None: ...
|
||||
|
||||
def evaluate_name_formula(bk: Book, nobj: Name, namex: str, blah: int = 0, level: int = 0) -> None: ...
|
||||
def decompile_formula(
|
||||
|
||||
@@ -116,6 +116,8 @@ def run_stubtest(dist: Path, *, verbose: bool = False, ci_platforms_only: bool =
|
||||
*packages_to_check,
|
||||
*modules_to_check,
|
||||
*allowlist_stubtest_arguments(dist_name),
|
||||
# FIXME: remove once issues are fixed, refs #14699
|
||||
"--ignore-disjoint-bases",
|
||||
]
|
||||
|
||||
stubs_dir = dist.parent
|
||||
|
||||
Reference in New Issue
Block a user