Remove unnecessary __all__ annotations (#3357)

This commit is contained in:
Sebastian Rittau
2019-10-14 01:22:03 +02:00
committed by Jelle Zijlstra
parent de26a3d109
commit 950f391704
15 changed files with 10 additions and 42 deletions

View File

@@ -1,7 +1,5 @@
# Source: https://hg.python.org/cpython/file/2.7/Lib/_threading_local.py
from typing import Any, List
__all__: List[str]
from typing import Any
class _localbase(object): ...

View File

@@ -4,8 +4,6 @@
from pipes import Template
from typing import Dict, List
__all__: List[str]
table: Dict[str, Template]
t: Template
uncompress: Template

View File

@@ -1,8 +1,7 @@
# Source: https://github.com/python/cpython/blob/master/Lib/_threading_local.py
from typing import Any, Dict, List, Tuple
from typing import Any, Dict, Tuple
from weakref import ReferenceType
__all__: List[str]
localdict = Dict[Any, Any]
class _localimpl:

View File

@@ -1,5 +1,5 @@
import sys
from typing import List, Type
from typing import Type
from asyncio.coroutines import (
coroutine as coroutine,
@@ -139,5 +139,3 @@ else:
IncompleteReadError as IncompleteReadError,
LimitOverrunError as LimitOverrunError,
)
__all__: List[str]

View File

@@ -1,6 +1,4 @@
from typing import Any, Callable, List, TypeVar
__all__: List[str]
from typing import Any, Callable, TypeVar
_F = TypeVar('_F', bound=Callable[..., Any])

View File

@@ -10,8 +10,6 @@ from asyncio.protocols import BaseProtocol
from asyncio.tasks import Task
from asyncio.transports import BaseTransport
__all__: List[str]
_T = TypeVar('_T')
_Context = Dict[str, Any]
_ExceptionHandler = Callable[[AbstractEventLoop, _Context], Any]

View File

@@ -1,5 +1,5 @@
import sys
from typing import List, Optional
from typing import Optional
if sys.version_info >= (3, 8):
class CancelledError(BaseException): ...
@@ -13,5 +13,3 @@ if sys.version_info >= (3, 8):
class LimitOverrunError(Exception):
consumed: int
def __init__(self, message: str, consumed: int) -> None: ...
__all__: List[str]

View File

@@ -14,8 +14,6 @@ if sys.version_info < (3, 8):
if sys.version_info >= (3, 7):
from contextvars import Context
__all__: List[str]
_T = TypeVar('_T')
_S = TypeVar('_S')

View File

@@ -1,4 +1,4 @@
from typing import Any, Callable, Generator, List, Type, TypeVar, Union, Optional, Awaitable
from typing import Any, Callable, Generator, Type, TypeVar, Union, Optional, Awaitable
from .coroutines import coroutine
from .events import AbstractEventLoop
@@ -7,8 +7,6 @@ from types import TracebackType
_T = TypeVar('_T')
__all__: List[str]
class _ContextManager:
def __init__(self, lock: Union[Lock, Semaphore]) -> None: ...
def __enter__(self) -> object: ...

View File

@@ -1,8 +1,5 @@
from asyncio import transports
from typing import List, Optional, Text, Tuple, Union
__all__: List[str]
from typing import Optional, Text, Tuple, Union
class BaseProtocol:
def connection_made(self, transport: transports.BaseTransport) -> None: ...

View File

@@ -1,9 +1,6 @@
from asyncio.events import AbstractEventLoop
from .coroutines import coroutine
from typing import Any, Generator, Generic, List, TypeVar, Optional
__all__: List[str]
from typing import Any, Generator, Generic, TypeVar, Optional
class QueueEmpty(Exception): ...
class QueueFull(Exception): ...

View File

@@ -1,5 +1,5 @@
import sys
from typing import Any, Awaitable, Callable, Generator, Iterable, List, Optional, Tuple, Union
from typing import Any, Awaitable, Callable, Generator, Iterable, Optional, Tuple, Union
from . import coroutines
from . import events
@@ -8,9 +8,6 @@ from . import transports
_ClientConnectedCallback = Callable[[StreamReader, StreamWriter], Optional[Awaitable[None]]]
__all__: List[str]
if sys.version_info < (3, 8):
class IncompleteReadError(EOFError):
expected: Optional[int]

View File

@@ -3,9 +3,7 @@ from asyncio import protocols
from asyncio import streams
from asyncio import transports
from asyncio.coroutines import coroutine
from typing import Any, Generator, List, Optional, Text, Tuple, Union, IO
__all__: List[str]
from typing import Any, Generator, Optional, Text, Tuple, Union, IO
PIPE: int
STDOUT: int

View File

@@ -12,8 +12,6 @@ if sys.version_info >= (3, 8):
else:
from typing_extensions import Literal
__all__: List[str]
_T = TypeVar('_T')
_T1 = TypeVar('_T1')
_T2 = TypeVar('_T2')

View File

@@ -2,8 +2,6 @@ import sys
from typing import Any, Mapping, List, Optional, Tuple
from asyncio.protocols import BaseProtocol
__all__: List[str]
class BaseTransport:
def __init__(self, extra: Mapping[Any, Any] = ...) -> None: ...
def get_extra_info(self, name: Any, default: Any = ...) -> Any: ...