mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-30 14:45:23 +08:00
Use error codes for type ignores (#8280)
Disable reportSelfClsParameterName for pytype as this is out of typeshed's control Closes: #7497
This commit is contained in:
@@ -3,7 +3,7 @@ from typing import Any
|
||||
from ...sql import sqltypes
|
||||
from .types import _StringType
|
||||
|
||||
class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum, _StringType): # type: ignore # incompatible with base class
|
||||
class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum, _StringType): # type: ignore[misc] # incompatible with base class
|
||||
__visit_name__: str
|
||||
native_enum: bool
|
||||
def __init__(self, *enums, **kw) -> None: ...
|
||||
|
||||
@@ -32,7 +32,7 @@ class _StringType(sqltypes.String):
|
||||
**kw,
|
||||
) -> None: ...
|
||||
|
||||
class _MatchType(sqltypes.Float, sqltypes.MatchType): # type: ignore # incompatible with base class
|
||||
class _MatchType(sqltypes.Float, sqltypes.MatchType): # type: ignore[misc] # incompatible with base class
|
||||
def __init__(self, **kw) -> None: ...
|
||||
|
||||
class NUMERIC(_NumericType, sqltypes.NUMERIC):
|
||||
|
||||
@@ -96,7 +96,7 @@ PGUuid = UUID
|
||||
class TSVECTOR(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum): # type: ignore # base classes incompatible
|
||||
class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum): # type: ignore[misc] # base classes incompatible
|
||||
native_enum: bool
|
||||
create_type: Any
|
||||
def __init__(self, *enums, **kw) -> None: ...
|
||||
|
||||
@@ -13,7 +13,7 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
|
||||
# can go through.
|
||||
def setdefault(self, k: NoReturn, default: object) -> object: ...
|
||||
# Mypy plugin hook for 'pop' expects that 'default' has a type variable type.
|
||||
def pop(self, k: NoReturn, default: _T = ...) -> object: ... # type: ignore
|
||||
def pop(self, k: NoReturn, default: _T = ...) -> object: ... # pyright: ignore[reportInvalidTypeVarUse]
|
||||
def update(self: Self, __m: Self) -> None: ...
|
||||
def items(self) -> ItemsView[str, object]: ...
|
||||
def keys(self) -> KeysView[str]: ...
|
||||
|
||||
@@ -27,7 +27,7 @@ class _Argon2Common( # type: ignore[misc]
|
||||
min_memory_cost: ClassVar[int]
|
||||
max_threads: ClassVar[int]
|
||||
pure_use_threads: ClassVar[bool]
|
||||
def type_values(cls): ... # type: ignore
|
||||
def type_values(cls): ...
|
||||
type: str
|
||||
parallelism: int
|
||||
version: int
|
||||
|
||||
@@ -78,7 +78,7 @@ class TOTP:
|
||||
def pretty_key(self, format: str = ..., sep: str = ...): ...
|
||||
@classmethod
|
||||
def normalize_time(cls, time): ...
|
||||
def normalize_token(self_or_cls, token): ... # type: ignore
|
||||
def normalize_token(self_or_cls, token): ...
|
||||
def generate(self, time: Any | None = ...): ...
|
||||
@classmethod
|
||||
def verify(cls, token, source, **kwds): ...
|
||||
|
||||
@@ -26,7 +26,8 @@ class Theme:
|
||||
junction_char: str = ...,
|
||||
junction_color: str = ...,
|
||||
) -> None: ...
|
||||
def format_code(s: str) -> str: ... # type: ignore
|
||||
# The following method is broken in upstream code.
|
||||
def format_code(s: str) -> str: ... # type: ignore[misc]
|
||||
|
||||
class Themes:
|
||||
DEFAULT: ClassVar[Theme]
|
||||
|
||||
Reference in New Issue
Block a user