Consistently use '= ...' for optional parameters.

This commit is contained in:
Matthias Kramm
2015-11-09 13:55:00 -08:00
parent 375bf063b1
commit 94c9ce8fd0
278 changed files with 2085 additions and 2085 deletions

View File

@@ -4,30 +4,30 @@
from typing import Any, List, TextIO, Union
def warn(message: Union[str, Warning], category: type = None,
stacklevel: int = 1) -> None: ...
def warn(message: Union[str, Warning], category: type = ...,
stacklevel: int = ...) -> None: ...
def warn_explicit(message: Union[str, Warning], category: type, filename: str,
lineno: int, module: str = None, registry: Any = None,
module_globals: Any = None) -> None: ...
lineno: int, module: str = ..., registry: Any = ...,
module_globals: Any = ...) -> None: ...
# logging modifies showwarning => make it a variable.
def _showwarning(message: str, category: type, filename: str, lineno: int,
file: TextIO = None, line: str = None) -> None: ...
file: TextIO = ..., line: str = ...) -> None: ...
showwarning = _showwarning
def formatwarning(message: str, category: type, filename: str, lineno: int,
line: str = None) -> None: ...
def filterwarnings(action: str, message: str = '', category: type = Warning,
module: str = '', lineno: int = 0,
append: bool = False) -> None: ...
def simplefilter(action: str, category: type = Warning, lineno: int = 0,
append: bool = False) -> None: ...
line: str = ...) -> None: ...
def filterwarnings(action: str, message: str = ..., category: type = ...,
module: str = ..., lineno: int = ...,
append: bool = ...) -> None: ...
def simplefilter(action: str, category: type = ..., lineno: int = ...,
append: bool = ...) -> None: ...
def resetwarnings() -> None: ...
class catch_warnings:
# TODO record and module must be keyword arguments!
# TODO type of module?
def __init__(self, record: bool = False, module: Any = None) -> None: ...
def __init__(self, record: bool = ..., module: Any = ...) -> None: ...
def __enter__(self) -> List[Any]: ...
def __exit__(self, type, value, traceback) -> bool: ...