mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
committed by
Łukasz Langa
parent
93bb4604cb
commit
2cb8e184cc
3
third_party/2/six/__init__.pyi
vendored
3
third_party/2/six/__init__.pyi
vendored
@@ -9,6 +9,7 @@ from typing import (
|
||||
)
|
||||
import typing
|
||||
import unittest
|
||||
from mypy_extensions import NoReturn
|
||||
|
||||
# Exports
|
||||
from __builtin__ import unichr as unichr
|
||||
@@ -79,7 +80,7 @@ def assertRaisesRegex(self: unittest.TestCase, msg: str = ...) -> Any: ...
|
||||
def assertRaisesRegex(self: unittest.TestCase, callable_obj: Callable[..., Any], *args: Any, **kwargs: Any) -> Any: ...
|
||||
def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: str = ...) -> None: ...
|
||||
|
||||
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> None: ...
|
||||
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> NoReturn: ...
|
||||
def exec_(_code_: Union[unicode, types.CodeType], _globs_: Dict[str, Any] = ..., _locs_: Dict[str, Any] = ...): ...
|
||||
def raise_from(value: BaseException, from_value: BaseException) -> None: ...
|
||||
|
||||
|
||||
7
third_party/2and3/mypy_extensions.pyi
vendored
7
third_party/2and3/mypy_extensions.pyi
vendored
@@ -1,6 +1,11 @@
|
||||
from typing import Dict, Type, TypeVar
|
||||
from typing import Dict, Type, TypeVar, Union
|
||||
|
||||
T = TypeVar('T')
|
||||
|
||||
|
||||
def TypedDict(typename: str, fields: Dict[str, Type[T]]) -> Type[dict]: ...
|
||||
|
||||
# Return type that indicates a function does not return.
|
||||
# This type is equivalent to the None type, but the no-op Union is necessary to
|
||||
# distinguish the None type from the None value.
|
||||
NoReturn = Union[None]
|
||||
|
||||
3
third_party/3/six/__init__.pyi
vendored
3
third_party/3/six/__init__.pyi
vendored
@@ -23,6 +23,7 @@ from typing import (
|
||||
import types
|
||||
import typing
|
||||
import unittest
|
||||
from mypy_extensions import NoReturn
|
||||
|
||||
# Exports
|
||||
from io import StringIO as StringIO, BytesIO as BytesIO
|
||||
@@ -92,7 +93,7 @@ def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[Any
|
||||
|
||||
exec_ = exec
|
||||
|
||||
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = None) -> None: ...
|
||||
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = None) -> NoReturn: ...
|
||||
def raise_from(value: BaseException, from_value: BaseException) -> None: ...
|
||||
|
||||
print_ = print
|
||||
|
||||
Reference in New Issue
Block a user