From c62e37f09e4fe2b6d2b278bcb59df439fcf1e0a7 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Sun, 2 Dec 2018 19:44:25 -0800 Subject: [PATCH] Add 'Literal[...]' to typing_extension stubs This pull request adds 'Literal' to the typing_extension stubs and serves as the dual of this PR: https://github.com/python/typing/pull/591 For background context, here's the associated PEP draft: https://github.com/Michael0x2a/peps/pull/1 --- third_party/2and3/typing_extensions.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/2and3/typing_extensions.pyi b/third_party/2and3/typing_extensions.pyi index 38ebf9eec454..8ac31fc35462 100644 --- a/third_party/2and3/typing_extensions.pyi +++ b/third_party/2and3/typing_extensions.pyi @@ -21,6 +21,7 @@ def runtime(cls: _TC) -> _TC: ... Protocol: _SpecialForm = ... Final: _SpecialForm = ... def final(f: _F) -> _F: ... +Literal: _SpecialForm = ... if sys.version_info >= (3, 3): from typing import ChainMap as ChainMap