From 0f6f2abc309f3247f7dfcd64e089bfd443ad811a Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Thu, 9 Aug 2018 07:57:46 -0700 Subject: [PATCH] Add another undocumented mypy_extension that we are trying out (#2374) --- third_party/2and3/mypy_extensions.pyi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/third_party/2and3/mypy_extensions.pyi b/third_party/2and3/mypy_extensions.pyi index 0003e9172..05400c8c7 100644 --- a/third_party/2and3/mypy_extensions.pyi +++ b/third_party/2and3/mypy_extensions.pyi @@ -1,6 +1,7 @@ -from typing import Dict, Type, TypeVar, Optional, Union, Any +from typing import Dict, Type, TypeVar, Optional, Union, Any, Generic _T = TypeVar('_T') +_U = TypeVar('_U') def TypedDict(typename: str, fields: Dict[str, Type[_T]], total: bool = ...) -> Type[dict]: ... @@ -19,3 +20,5 @@ NoReturn = Union[None] # Deprecated: Use typing.NoReturn instead. # This is intended as a class decorator, but mypy rejects abstract classes # when a Type[_T] is expected, so we can't give it the type we want def trait(cls: Any) -> Any: ... + +class FlexibleAlias(Generic[_T, _U]): ...