mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-08 19:00:59 +08:00
Remove nearly all __str__ and __repr__ methods from typeshed (#6968)
This commit is contained in:
@@ -16,7 +16,6 @@ if sys.platform == "win32":
|
||||
wAttributes: wintypes.WORD
|
||||
srWindow: wintypes.SMALL_RECT
|
||||
dwMaximumWindowSize: COORD
|
||||
def __str__(self) -> str: ...
|
||||
def winapi_test() -> bool: ...
|
||||
def GetConsoleScreenBufferInfo(stream_id: int = ...) -> CONSOLE_SCREEN_BUFFER_INFO: ...
|
||||
def SetConsoleTextAttribute(stream_id: int, attrs: wintypes.WORD) -> wintypes.BOOL: ...
|
||||
|
||||
@@ -37,8 +37,6 @@ class Enum(metaclass=EnumMeta):
|
||||
@staticmethod
|
||||
def _generate_next_value_(name: str, start: int, count: int, last_values: list[Any]) -> Any: ...
|
||||
def __new__(cls: type[Self], value: object) -> Self: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __str__(self) -> str: ...
|
||||
def __dir__(self) -> list[str]: ...
|
||||
def __format__(self, format_spec: str) -> str: ...
|
||||
def __hash__(self) -> Any: ...
|
||||
@@ -57,8 +55,6 @@ class auto(IntFlag):
|
||||
|
||||
class Flag(Enum):
|
||||
def __contains__(self: _T, other: _T) -> bool: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __str__(self) -> str: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __or__(self: Self, other: Self) -> Self: ...
|
||||
def __and__(self: Self, other: Self) -> Self: ...
|
||||
|
||||
@@ -4,7 +4,6 @@ from types import TracebackType
|
||||
|
||||
class Timeout(TimeoutError):
|
||||
def __init__(self, lock_file: str) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
class _Acquire_ReturnProxy:
|
||||
def __init__(self, lock: str) -> None: ...
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
frozendict.FrozenOrderedDict
|
||||
frozendict.frozendict.__hash__
|
||||
frozendict.frozendict.__new__
|
||||
frozendict.frozendict.__repr__
|
||||
frozendict.frozendict.copy
|
||||
|
||||
@@ -19,7 +19,6 @@ class frozendict(Mapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def copy(self: Self, **add_or_replace: _VT) -> Self: ...
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class FrozenOrderedDict(frozendict[_KT, _VT]):
|
||||
|
||||
@@ -18,7 +18,6 @@ class BaseContainer(Sequence[_T]):
|
||||
def __len__(self) -> int: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def sort(self, *, key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...) -> None: ...
|
||||
@overload
|
||||
def __getitem__(self, key: SupportsIndex) -> _T: ...
|
||||
|
||||
@@ -4,7 +4,6 @@ class weekday(object):
|
||||
def __init__(self, weekday: int, n: int | None = ...) -> None: ...
|
||||
def __call__(self: Self, n: int) -> Self: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __hash__(self) -> int: ...
|
||||
weekday: int
|
||||
n: int
|
||||
|
||||
@@ -94,6 +94,5 @@ class relativedelta(object):
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
def __div__(self: Self, other: SupportsFloat) -> Self: ...
|
||||
def __truediv__(self: Self, other: SupportsFloat) -> Self: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __abs__(self: Self) -> Self: ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
@@ -70,7 +70,6 @@ class FlagValues:
|
||||
def RegisteredFlags(self) -> list[str]: ...
|
||||
def flag_values_dict(self) -> dict[str, Any]: ...
|
||||
FlagValuesDict = flag_values_dict
|
||||
def __str__(self) -> str: ...
|
||||
def GetHelp(self, prefix: str = ...) -> str: ...
|
||||
def module_help(self, module: ModuleType | str) -> str: ...
|
||||
ModuleHelp = module_help
|
||||
|
||||
Reference in New Issue
Block a user