[WIP] Typeshed support for mypy_extensions.declared_type#1230
[WIP] Typeshed support for mypy_extensions.declared_type#1230sixolet wants to merge 6 commits intopython:masterfrom
Conversation
| # distinguish the None type from the None value. | ||
| NoReturn = Union[None] | ||
|
|
||
| def decorated_type(t: Type) -> Callable[[_T], _T]: pass No newline at end of file |
There was a problem hiding this comment.
Extremely minor, but I prefer Type[Any] over just Type to be explicit; typeshed style is to use ... instead of pass, and please add a closing newline.
|
Looks good, I'll merge this once the corresponding mypy PR is merged. |
| # distinguish the None type from the None value. | ||
| NoReturn = Union[None] | ||
|
|
||
| def decorated_type(t: Type[Any]) -> Callable[[_T], _T]: ... |
There was a problem hiding this comment.
The argument type should probably be Any, since some valid types aren't real types (e.g. None).
There was a problem hiding this comment.
Yep. Thanks. Good catch.
|
Gonna conflict with my other PR, but that'll be easy to merge -- just imports I think. |
|
Looks good; let's merge this after the mypy PR is merged. |
|
@JukkaL ping seems ready |
gvanrossum
left a comment
There was a problem hiding this comment.
One optional suggestion. I'm not sure if this ought to be merged before or after the corresponding mypy change (#3291).
| @@ -1,4 +1,4 @@ | |||
| from typing import Dict, Type, TypeVar, Optional, Union | |||
| from typing import Dict, Type, TypeVar, Union, Callable, Any, Optional | |||
There was a problem hiding this comment.
Usually when I update such an import list I also alphabetize the names.
|
Maybe this should go into typing_extensions (see https://github.com/python/typing/tree/master/typing_extensions). |
|
Thanks for keeping this fresh, but the mypy patch is still out of date. I think we need a new volunteer... |
|
Closing this since there's been no activity for many months. If somebody wants to pick it up we can re-open this PR. |
The typeshed part of python/mypy#3291