mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 18:31:14 +08:00
Switch usages of mypy_extensions.NoReturn over to typing.NoReturn. (#1942)
* Change mypy_extensions.NoReturn to typing.NoReturn everywhere.
This commit is contained in:
@@ -4,14 +4,13 @@
|
||||
# Python 3, and stub files conform to Python 3 syntax.
|
||||
|
||||
from typing import (
|
||||
TypeVar, Iterator, Iterable, overload,
|
||||
TypeVar, Iterator, Iterable, NoReturn, overload,
|
||||
Sequence, Mapping, Tuple, List, Any, Dict, Callable, Generic, Set,
|
||||
AbstractSet, FrozenSet, Sized, Reversible, SupportsInt, SupportsFloat, SupportsAbs,
|
||||
SupportsRound, IO, BinaryIO, Union, AnyStr, MutableSequence, MutableMapping,
|
||||
MutableSet, ItemsView, KeysView, ValuesView, Optional, Container, Type
|
||||
)
|
||||
from abc import abstractmethod, ABCMeta
|
||||
from mypy_extensions import NoReturn
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_T_co = TypeVar('_T_co', covariant=True)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from mypy_extensions import NoReturn
|
||||
from typing import Any, Callable, Dict, Optional, Tuple
|
||||
from typing import Any, Callable, Dict, NoReturn, Optional, Tuple
|
||||
|
||||
class error(Exception):
|
||||
def __init__(self, *args: Any) -> None: ...
|
||||
|
||||
@@ -7,10 +7,9 @@ from posix import stat_result as stat_result # TODO: use this, see https://gith
|
||||
import sys
|
||||
from typing import (
|
||||
Mapping, MutableMapping, Dict, List, Any, Tuple, Iterator, overload, Union, AnyStr,
|
||||
Optional, Generic, Set, Callable, Text, Sequence, IO, NamedTuple, TypeVar
|
||||
Optional, Generic, Set, Callable, Text, Sequence, IO, NamedTuple, NoReturn, TypeVar
|
||||
)
|
||||
from . import path as path
|
||||
from mypy_extensions import NoReturn
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import Any, AnyStr, Callable, Container, Dict, IO, List, Mapping, MutableMapping, Optional, Tuple, Type, Union
|
||||
from mypy_extensions import NoReturn
|
||||
from typing import Any, AnyStr, Callable, Container, Dict, IO, List, Mapping, MutableMapping, NoReturn, Optional, Tuple, Type, Union
|
||||
from repr import Repr
|
||||
|
||||
from types import FunctionType, MethodType, ModuleType, TracebackType
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
"""Stubs for the 'sys' module."""
|
||||
|
||||
from typing import (
|
||||
IO, Union, List, Sequence, Any, Dict, Tuple, BinaryIO, Optional, Callable,
|
||||
overload, Text, Type,
|
||||
IO, NoReturn, Union, List, Sequence, Any, Dict, Tuple, BinaryIO, Optional,
|
||||
Callable, overload, Text, Type,
|
||||
)
|
||||
from types import FrameType, ModuleType, TracebackType, ClassType
|
||||
from mypy_extensions import NoReturn
|
||||
|
||||
class _flags:
|
||||
bytes_warning = ... # type: int
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
|
||||
# Based on http://docs.python.org/2.7/library/unittest.html
|
||||
|
||||
from mypy_extensions import NoReturn
|
||||
from typing import (Any, Callable, Dict, FrozenSet, Iterable, Iterator,
|
||||
List, Optional, overload, Pattern, Sequence, Set, Text,
|
||||
TextIO, Tuple, Type, TypeVar, Union)
|
||||
List, NoReturn, Optional, overload, Pattern, Sequence, Set,
|
||||
Text, TextIO, Tuple, Type, TypeVar, Union)
|
||||
from abc import abstractmethod, ABCMeta
|
||||
import types
|
||||
|
||||
|
||||
Reference in New Issue
Block a user