mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Add another undocumented mypy_extension that we are trying out (#2374)
This commit is contained in:
committed by
Ivan Levkivskyi
parent
bc8d68cd34
commit
0f6f2abc30
5
third_party/2and3/mypy_extensions.pyi
vendored
5
third_party/2and3/mypy_extensions.pyi
vendored
@@ -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]): ...
|
||||
|
||||
Reference in New Issue
Block a user