Skip to content

Commit 1b80461

Browse files
authored
mypy_extensions: fix NoReturn, remove inaccurate comment (#6595)
1 parent d84a038 commit 1b80461

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

stubs/mypy-extensions/mypy_extensions.pyi

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import abc
22
import sys
3-
from typing import Any, Callable, Generic, ItemsView, KeysView, Mapping, Type, TypeVar, Union, ValuesView
3+
from typing import Any, Callable, Generic, ItemsView, KeysView, Mapping, Type, TypeVar, ValuesView
44

55
_T = TypeVar("_T")
66
_U = TypeVar("_U")
@@ -34,9 +34,8 @@ def VarArg(type: _T = ...) -> _T: ...
3434
def KwArg(type: _T = ...) -> _T: ...
3535

3636
# Return type that indicates a function does not return.
37-
# This type is equivalent to the None type, but the no-op Union is necessary to
38-
# distinguish the None type from the None value.
39-
NoReturn = Union[None] # Deprecated: Use typing.NoReturn instead.
37+
# Deprecated: Use typing.NoReturn instead.
38+
class NoReturn: ...
4039

4140
# This is intended as a class decorator, but mypy rejects abstract classes
4241
# when a Type[_T] is expected, so we can't give it the type we want

0 commit comments

Comments
 (0)