Remove nearly all __str__ and __repr__ methods from typeshed (#6968)

This commit is contained in:
Alex Waygood
2022-01-19 23:45:11 +00:00
committed by GitHub
parent fe6233a8c3
commit aea52b35d1
27 changed files with 11 additions and 72 deletions

View File

@@ -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: ...