Change more defaults to ... (#1729)

* codemod ': Any = None' ': Any = ...'
* codemod ': (Union|Optional)([^=]+)\s+=\s+-?\d+' ': \1\2 = ...'
* codemod ': (Union|Optional)([^=]+)\s*=\s*-?(None|False|True)' ': \1\2 = ...'
* codemod ': (int|float|bool)\s*=\s*-?\d+' ': \1 = ...'
* codemod ': (bool)\s*=\s*(False|True)' ': \1 = ...'
* codemod ': Any\s*=\s*(False|True|None)' ': Any = ...'
This commit is contained in:
Jelle Zijlstra
2017-11-13 06:56:24 -08:00
committed by Matthias Kramm
parent 0080017d02
commit 83ca997140
19 changed files with 86 additions and 86 deletions

View File

@@ -6,7 +6,7 @@ from typing import Any, AnyStr, Callable, ContextManager, IO, Iterator, Optional
def replace_atomic(src: AnyStr, dst: AnyStr) -> None: ...
def move_atomic(src: AnyStr, dst: AnyStr) -> None: ...
class AtomicWriter(object):
def __init__(self, path: AnyStr, mode: Text='w', overwrite: bool=False) -> None: ...
def __init__(self, path: AnyStr, mode: Text='w', overwrite: bool = ...) -> None: ...
def open(self) -> ContextManager[IO]: ...
def _open(self, get_fileobject: Callable) -> ContextManager[IO]: ...
def get_fileobject(self, dir: Optional[AnyStr] = ..., **kwargs) -> IO: ...

View File

@@ -121,7 +121,7 @@ class Context:
def abort(self) -> None:
...
def exit(self, code: Union[int, str] = 0) -> None:
def exit(self, code: Union[int, str] = ...) -> None:
...
def get_usage(self) -> str:

View File

@@ -107,7 +107,7 @@ def unstyle(text: str) -> str:
def secho(
text: str,
file: Optional[IO] = ...,
nl: bool =True,
nl: bool = ...,
err: bool = ...,
color: Optional[bool] = ...,
fg: Optional[str] = ...,

View File

@@ -96,7 +96,7 @@ class Connection:
def rollback(self): ...
def escape(self, obj): ...
def literal(self, obj): ...
def cursor(self, cursor: Optional[Type[Cursor]]=None): ...
def cursor(self, cursor: Optional[Type[Cursor]] = ...): ...
def __enter__(self): ...
def __exit__(self, exc, value, traceback): ...
def query(self, sql): ...

View File

@@ -44,10 +44,10 @@ DEFAULT_RETRIES = ... # type: Any
class BaseAdapter:
def __init__(self) -> None: ...
def send(self, request: PreparedRequest, stream: bool=False,
timeout: Union[None, float, Tuple[float, float]]=None,
verify: bool=False,
cert: Union[None, Union[bytes, Text], Container[Union[bytes, Text]]]=None
def send(self, request: PreparedRequest, stream: bool = ...,
timeout: Union[None, float, Tuple[float, float]] = ...,
verify: bool = ...,
cert: Union[None, Union[bytes, Text], Container[Union[bytes, Text]]] = ...
) -> Response: ...
def close(self) -> None: ...
class HTTPAdapter(BaseAdapter):