mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Remove nearly all __str__ and __repr__ methods from typeshed (#6968)
This commit is contained in:
@@ -5,7 +5,6 @@ from typing import Pattern, Text, TypeVar
|
||||
_T = TypeVar("_T", bound=Version)
|
||||
|
||||
class Version:
|
||||
def __repr__(self) -> str: ...
|
||||
@abstractmethod
|
||||
def __init__(self, vstring: Text | None = ...) -> None: ...
|
||||
@abstractmethod
|
||||
@@ -21,7 +20,7 @@ class StrictVersion(Version):
|
||||
prerelease: tuple[Text, int] | None
|
||||
def __init__(self, vstring: Text | None = ...) -> None: ...
|
||||
def parse(self: Self, vstring: Text) -> Self: ...
|
||||
def __str__(self) -> str: ...
|
||||
def __str__(self) -> str: ... # noqa Y029
|
||||
def __cmp__(self: _T, other: _T | str) -> bool: ...
|
||||
|
||||
class LooseVersion(Version):
|
||||
@@ -30,5 +29,5 @@ class LooseVersion(Version):
|
||||
version: tuple[Text | int, ...]
|
||||
def __init__(self, vstring: Text | None = ...) -> None: ...
|
||||
def parse(self: Self, vstring: Text) -> Self: ...
|
||||
def __str__(self) -> str: ...
|
||||
def __str__(self) -> str: ... # noqa Y029
|
||||
def __cmp__(self: _T, other: _T | str) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user