mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 13:02:22 +08:00
Use typing_extensions.Self instead of _typeshed.Self (#9702)
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
from _typeshed import Self
|
||||
from re import Pattern
|
||||
from typing_extensions import Self
|
||||
|
||||
class Version:
|
||||
def __init__(self, vstring: str | None = ...) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __lt__(self: Self, other: Self | str) -> bool: ...
|
||||
def __le__(self: Self, other: Self | str) -> bool: ...
|
||||
def __gt__(self: Self, other: Self | str) -> bool: ...
|
||||
def __ge__(self: Self, other: Self | str) -> bool: ...
|
||||
def __lt__(self, other: Self | str) -> bool: ...
|
||||
def __le__(self, other: Self | str) -> bool: ...
|
||||
def __gt__(self, other: Self | str) -> bool: ...
|
||||
def __ge__(self, other: Self | str) -> bool: ...
|
||||
|
||||
class StrictVersion(Version):
|
||||
version_re: Pattern[str]
|
||||
version: tuple[int, int, int]
|
||||
prerelease: tuple[str, int] | None
|
||||
def __init__(self, vstring: str | None = ...) -> None: ...
|
||||
def parse(self: Self, vstring: str) -> Self: ...
|
||||
def _cmp(self: Self, other: Self | str) -> bool: ...
|
||||
def parse(self, vstring: str) -> Self: ...
|
||||
def _cmp(self, other: Self | str) -> bool: ...
|
||||
|
||||
class LooseVersion(Version):
|
||||
component_re: Pattern[str]
|
||||
vstring: str
|
||||
version: tuple[str | int, ...]
|
||||
def __init__(self, vstring: str | None = ...) -> None: ...
|
||||
def parse(self: Self, vstring: str) -> Self: ...
|
||||
def _cmp(self: Self, other: Self | str) -> bool: ...
|
||||
def parse(self, vstring: str) -> Self: ...
|
||||
def _cmp(self, other: Self | str) -> bool: ...
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from types import ModuleType
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
from unittest import TestLoader, TestSuite
|
||||
|
||||
from setuptools import Command
|
||||
@@ -16,7 +17,7 @@ class NonDataProperty(Generic[_T]):
|
||||
fget: Callable[..., _T]
|
||||
def __init__(self, fget: Callable[..., _T]) -> None: ...
|
||||
@overload
|
||||
def __get__(self: Self, obj: None, objtype: object = ...) -> Self: ...
|
||||
def __get__(self, obj: None, objtype: object = ...) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, obj: Any, objtype: object = ...) -> _T: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user