Use 'as name' patter to re-export names from stubs (PEP 484) (#1484)

This commit is contained in:
Ivan Levkivskyi
2017-07-14 21:31:53 -07:00
committed by Jelle Zijlstra
parent 643aedea1b
commit d75ea88da5
4 changed files with 8 additions and 7 deletions

View File

@@ -1,8 +1,8 @@
from typing import Any, Callable, Generator, Iterable, Iterator, List, Type, TypeVar, Union, Optional
from typing import Any, Callable, Generator, Iterable, Iterator, List, Type, TypeVar, Union, Optional, Awaitable
from .coroutines import coroutine
from .events import AbstractEventLoop
from .futures import Future, Awaitable
from .futures import Future
from types import TracebackType
_T = TypeVar('_T')

View File

@@ -1,10 +1,10 @@
import sys
from typing import Any, IO, Optional, Tuple, Callable, Dict, List, Union
from .decoder import JSONDecoder
from .encoder import JSONEncoder
from .decoder import JSONDecoder as JSONDecoder
from .encoder import JSONEncoder as JSONEncoder
if sys.version_info >= (3, 5):
from .decoder import JSONDecodeError
from .decoder import JSONDecodeError as JSONDecodeError
def dumps(obj: Any,
skipkeys: bool = ...,

View File

@@ -1,4 +1,5 @@
from click.core import Optional, Context
from click.core import Context
from typing import Optional
def get_current_context(silent: bool = False) -> Context:

View File

@@ -1,6 +1,6 @@
from typing import Any, Optional
from markupsafe import Markup, escape, soft_unicode
from markupsafe import Markup as Markup, escape as escape, soft_unicode as soft_unicode
missing = ... # type: Any
internal_code = ... # type: Any