Add the mypyc_attr function to mypy_extensions (#3290)

This commit is contained in:
Michael J. Sullivan
2019-10-01 17:45:47 -07:00
committed by GitHub
parent 0abb50e20a
commit ad881f94d7

View File

@@ -1,7 +1,8 @@
import abc
import sys
from typing import (
Dict, Type, TypeVar, Optional, Union, Any, Generic, Mapping, ItemsView, KeysView, ValuesView
Dict, Type, TypeVar, Optional, Union, Any, Generic, Mapping, ItemsView, KeysView, ValuesView,
Callable,
)
_T = TypeVar('_T')
@@ -41,4 +42,6 @@ NoReturn = Union[None] # Deprecated: Use typing.NoReturn instead.
# when a Type[_T] is expected, so we can't give it the type we want
def trait(cls: Any) -> Any: ...
def mypyc_attr(*attrs: str, **kwattrs: object) -> Callable[[_T], _T]: ...
class FlexibleAlias(Generic[_T, _U]): ...