mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-27 21:32:12 +08:00
Add Optional[] for all remaining cases of x: <type> = None (#1424)
* Final round of adding Optional[] to type of arguments with default = None * Update Travis to use --no-implicit-optionals and clarify CONTRIBUTING.md
This commit is contained in:
committed by
Matthias Kramm
parent
81f77b17ec
commit
350563223f
6
third_party/3/six/__init__.pyi
vendored
6
third_party/3/six/__init__.pyi
vendored
@@ -84,12 +84,12 @@ def byte2int(bs: binary_type) -> int: ...
|
||||
def indexbytes(buf: binary_type, i: int) -> int: ...
|
||||
def iterbytes(buf: binary_type) -> typing.Iterator[int]: ...
|
||||
|
||||
def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: str = None) -> None: ...
|
||||
def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: Optional[str] = None) -> None: ...
|
||||
@overload
|
||||
def assertRaisesRegex(self: unittest.TestCase, msg: str = None) -> Any: ...
|
||||
def assertRaisesRegex(self: unittest.TestCase, msg: Optional[str] = None) -> Any: ...
|
||||
@overload
|
||||
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) -> None: ...
|
||||
def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: Optional[str] = None) -> None: ...
|
||||
|
||||
exec_ = exec
|
||||
|
||||
|
||||
9
third_party/3/werkzeug/wrappers.pyi
vendored
9
third_party/3/werkzeug/wrappers.pyi
vendored
@@ -76,7 +76,14 @@ class BaseResponse:
|
||||
status = ... # type: str
|
||||
direct_passthrough = ... # type: bool
|
||||
response = ... # type: Iterable[bytes]
|
||||
def __init__(self, response: Union[Iterable[bytes], bytes]=None, status: Union[str, int]=None, headers: Union[Headers, Mapping[str, str], Sequence[Tuple[str, str]]]=None, mimetype: str=None, content_type: str=None, direct_passthrough: bool=False) -> None: ...
|
||||
def __init__(self, response: Optional[Union[Iterable[bytes], bytes]]=None,
|
||||
status: Optional[Union[str, int]]=None,
|
||||
headers: Optional[Union[Headers,
|
||||
Mapping[str, str],
|
||||
Sequence[Tuple[str, str]]]]=None,
|
||||
mimetype: Optional[str] = None,
|
||||
content_type: Optional[str] = None,
|
||||
direct_passthrough: bool=False) -> None: ...
|
||||
def call_on_close(self, func): ...
|
||||
@classmethod
|
||||
def force_type(cls, response, environ=None): ...
|
||||
|
||||
Reference in New Issue
Block a user