Skip to content

Add stubs for typing_extensions module #1471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions third_party/2and3/typing_extensions.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import sys
import typing
from typing import ClassVar as ClassVar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're missing Type, which is also in __all__.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! Fixed.

from typing import ContextManager as ContextManager
from typing import Counter as Counter
from typing import DefaultDict as DefaultDict
from typing import Deque as Deque
from typing import NewType as NewType
from typing import NoReturn as NoReturn
from typing import overload as overload
from typing import Text as Text
from typing import Type as Type
from typing import TYPE_CHECKING as TYPE_CHECKING

if sys.version_info >= (3, 3):
from typing import ChainMap as ChainMap

if sys.version_info >= (3, 5):
from typing import AsyncIterable as AsyncIterable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Awaitable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fixed.

from typing import AsyncIterator as AsyncIterator
from typing import AsyncContextManager as AsyncContextManager
from typing import Awaitable as Awaitable
from typing import Coroutine as Coroutine

if sys.version_info >= (3, 6):
from typing import AsyncGenerator as AsyncGenerator