mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
stdlib: add __slots__ (#14611)
This commit is contained in:
@@ -39,12 +39,15 @@ if sys.version_info < (3, 11):
|
||||
MAX_CACHE_SIZE: Final[int]
|
||||
|
||||
class _ResultMixinStr:
|
||||
__slots__ = ()
|
||||
def encode(self, encoding: str = "ascii", errors: str = "strict") -> _ResultMixinBytes: ...
|
||||
|
||||
class _ResultMixinBytes:
|
||||
__slots__ = ()
|
||||
def decode(self, encoding: str = "ascii", errors: str = "strict") -> _ResultMixinStr: ...
|
||||
|
||||
class _NetlocResultMixinBase(Generic[AnyStr]):
|
||||
__slots__ = ()
|
||||
@property
|
||||
def username(self) -> AnyStr | None: ...
|
||||
@property
|
||||
@@ -55,8 +58,11 @@ class _NetlocResultMixinBase(Generic[AnyStr]):
|
||||
def port(self) -> int | None: ...
|
||||
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
||||
|
||||
class _NetlocResultMixinStr(_NetlocResultMixinBase[str], _ResultMixinStr): ...
|
||||
class _NetlocResultMixinBytes(_NetlocResultMixinBase[bytes], _ResultMixinBytes): ...
|
||||
class _NetlocResultMixinStr(_NetlocResultMixinBase[str], _ResultMixinStr):
|
||||
__slots__ = ()
|
||||
|
||||
class _NetlocResultMixinBytes(_NetlocResultMixinBase[bytes], _ResultMixinBytes):
|
||||
__slots__ = ()
|
||||
|
||||
class _DefragResultBase(NamedTuple, Generic[AnyStr]):
|
||||
url: AnyStr
|
||||
|
||||
Reference in New Issue
Block a user