Switch usages of mypy_extensions.NoReturn over to typing.NoReturn. (#1942)

* Change mypy_extensions.NoReturn to typing.NoReturn everywhere.
This commit is contained in:
rchen152
2018-03-05 12:42:29 -08:00
committed by Matthias Kramm
parent f91163d729
commit 38dc8f5a6a
18 changed files with 29 additions and 39 deletions

View File

@@ -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
TIMEOUT_MAX: int
error = RuntimeError

View File

@@ -2,7 +2,7 @@
from typing import (
TypeVar, Iterator, Iterable, overload, Container,
Sequence, MutableSequence, Mapping, MutableMapping, Tuple, List, Any, Dict, Callable, Generic,
Sequence, MutableSequence, Mapping, MutableMapping, NoReturn, Tuple, List, Any, Dict, Callable, Generic,
Set, AbstractSet, FrozenSet, MutableSet, Sized, Reversible, SupportsInt, SupportsFloat,
SupportsBytes, SupportsAbs, SupportsRound, IO, Union, ItemsView, KeysView, ValuesView,
ByteString, Optional, AnyStr, Type,
@@ -10,7 +10,6 @@ from typing import (
from abc import abstractmethod, ABCMeta
from types import TracebackType, CodeType
import sys
from mypy_extensions import NoReturn
# Note that names imported above are not automatically made visible via the
# implicit builtins import.

View File

@@ -4,10 +4,9 @@
from io import TextIOWrapper as _TextIOWrapper
import sys
from typing import (
Mapping, MutableMapping, Dict, List, Any, Tuple, IO, Iterable, Iterator, overload, Union, AnyStr,
Mapping, MutableMapping, Dict, List, Any, Tuple, IO, Iterable, Iterator, NoReturn, overload, Union, AnyStr,
Optional, Generic, Set, Callable, Text, Sequence, NamedTuple, TypeVar, ContextManager
)
from mypy_extensions import NoReturn
# Re-exported names from other modules.
from builtins import OSError as error

View File

@@ -4,12 +4,11 @@
# based on http://docs.python.org/3.2/library/sys.html
from typing import (
List, Sequence, Any, Dict, Tuple, TextIO, overload, Optional, Union,
TypeVar, Callable, Type,
List, NoReturn, Sequence, Any, Dict, Tuple, TextIO, overload, Optional,
Union, TypeVar, Callable, Type,
)
import sys
from types import FrameType, TracebackType
from mypy_extensions import NoReturn
_T = TypeVar('_T')

View File

@@ -1,10 +1,9 @@
# Stubs for unittest
from mypy_extensions import NoReturn
from typing import (
Any, Callable, ContextManager, Dict, FrozenSet, Generic, Iterable, Iterator,
List, Optional, overload, Pattern, Sequence, Set, TextIO, Tuple, Type,
TypeVar, Union
List, NoReturn, Optional, overload, Pattern, Sequence, Set, TextIO, Tuple,
Type, TypeVar, Union
)
import logging
import sys