mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Define __slots__ for object as Iterable[str] / Iterable[Union[str, unicode]] (#780)
* Define __slots__ for object as Iterable[str] / Iterable[Union[str, unicode]] * A string as __slots__ value is also valid and represents a single item
This commit is contained in:
@@ -29,6 +29,7 @@ class classmethod: pass # Special, only valid as a decorator.
|
||||
class object:
|
||||
__doc__ = ... # type: Optional[str]
|
||||
__class__ = ... # type: type
|
||||
__slots__ = ... # type: Optional[Union[str, unicode, Iterable[Union[str, unicode]]]]
|
||||
|
||||
def __init__(self) -> None: ...
|
||||
def __new__(cls) -> Any: ...
|
||||
|
||||
@@ -13,7 +13,6 @@ AF_UNSPEC = 0 # from socket
|
||||
AI_PASSIVE = 0
|
||||
|
||||
class Handle:
|
||||
__slots__ = ... # type: List[str]
|
||||
_cancelled = False
|
||||
_args = ... # type: List[Any]
|
||||
def __init__(self, callback: Callable[..., Any], args: List[Any],
|
||||
|
||||
@@ -15,7 +15,6 @@ from concurrent.futures import (
|
||||
class InvalidStateError(Error): ...
|
||||
|
||||
class _TracebackLogger:
|
||||
__slots__ = ... # type: List[str]
|
||||
exc = ... # type: BaseException
|
||||
tb = ... # type: List[str]
|
||||
def __init__(self, exc: Any, loop: AbstractEventLoop) -> None: ...
|
||||
|
||||
@@ -32,6 +32,7 @@ class object:
|
||||
__doc__ = ... # type: Optional[str]
|
||||
__class__ = ... # type: type
|
||||
__dict__ = ... # type: Dict[str, Any]
|
||||
__slots__ = ... # type: Optional[Union[str, Iterable[str]]]
|
||||
|
||||
def __init__(self) -> None: ...
|
||||
def __new__(cls) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user