Preserve original type in total_ordering annotation (#3552)

See https://github.com/microsoft/pyright/issues/443
for reference.
This commit is contained in:
layday authored and Jelle Zijlstra committed 2019-12-20 17:18:05 -08:00
1 parent f7119c30ce
commit e404e1592d
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -3,7 +3,7 @@
# NOTE: These are incomplete!
from abc import ABCMeta, abstractmethod
from typing import Any, Callable, Generic, Dict, Iterable, Optional, Sequence, Tuple, TypeVar, overload
from typing import Any, Callable, Generic, Dict, Iterable, Optional, Sequence, Tuple, Type, TypeVar, overload
_AnyCallable = Callable[..., Any]
@@ -22,7 +22,7 @@ WRAPPER_UPDATES: Sequence[str]
def update_wrapper(wrapper: _AnyCallable, wrapped: _AnyCallable, assigned: Sequence[str] = ...,
updated: Sequence[str] = ...) -> _AnyCallable: ...
def wraps(wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> Callable[[_AnyCallable], _AnyCallable]: ...
def total_ordering(cls: type) -> type: ...
def total_ordering(cls: Type[_T]) -> Type[_T]: ...
def cmp_to_key(mycmp: Callable[[_T, _T], int]) -> Callable[[_T], Any]: ...
class partial(Generic[_T]):