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

@@ -14,15 +14,15 @@ class Queue:
not_full = ... # type: Any
all_tasks_done = ... # type: Any
unfinished_tasks = ... # type: Any
def __init__(self, maxsize: int = 0) -> None: ...
def __init__(self, maxsize: int = ...) -> None: ...
def task_done(self) -> None: ...
def join(self) -> None: ...
def qsize(self) -> int: ...
def empty(self) -> bool: ...
def full(self) -> bool: ...
def put(self, item: Any, block: bool = ..., timeout: float = None) -> None: ...
def put(self, item: Any, block: bool = ..., timeout: float = ...) -> None: ...
def put_nowait(self, item) -> None: ...
def get(self, block: bool = ..., timeout: float = None) -> Any: ...
def get(self, block: bool = ..., timeout: float = ...) -> Any: ...
def get_nowait(self) -> Any: ...
class PriorityQueue(Queue): ...

View File

@@ -5,17 +5,17 @@ from typing import Any, IO, AnyStr, Iterator, Iterable, Generic, List
class StringIO(IO[AnyStr], Generic[AnyStr]):
closed = ... # type: bool
softspace = ... # type: int
def __init__(self, buf: AnyStr = '') -> None: ...
def __init__(self, buf: AnyStr = ...) -> None: ...
def __iter__(self) -> Iterator[AnyStr]: ...
def next(self) -> AnyStr: ...
def close(self) -> None: ...
def isatty(self) -> bool: ...
def seek(self, pos: int, mode: int = 0) -> None: ...
def seek(self, pos: int, mode: int = ...) -> None: ...
def tell(self) -> int: ...
def read(self, n: int = -1) -> AnyStr: ...
def readline(self, length: int = None) -> AnyStr: ...
def readlines(self, sizehint: int = 0) -> List[AnyStr]: ...
def truncate(self, size: int = None) -> int: ...
def read(self, n: int = ...) -> AnyStr: ...
def readline(self, length: int = ...) -> AnyStr: ...
def readlines(self, sizehint: int = ...) -> List[AnyStr]: ...
def truncate(self, size: int = ...) -> int: ...
def write(self, s: AnyStr) -> None: ...
def writelines(self, iterable: Iterable[AnyStr]) -> None: ...
def flush(self) -> None: ...

View File

@@ -6,6 +6,6 @@ _VT = TypeVar('_VT')
class UserDict(Dict[_KT, _VT], Generic[_KT, _VT]):
data = ... # type: Mapping[_KT, _VT]
def __init__(self, initialdata: Mapping[_KT, _VT] = None) -> None: ...
def __init__(self, initialdata: Mapping[_KT, _VT] = ...) -> None: ...
# TODO: DictMixin

View File

@@ -14,18 +14,18 @@ REMAINDER = ... # type: Any
class _AttributeHolder: ...
class HelpFormatter:
def __init__(self, prog, indent_increment=2, max_help_position=24, width=None) -> None: ...
def __init__(self, prog, indent_increment=..., max_help_position=..., width=...) -> None: ...
class _Section:
formatter = ... # type: Any
parent = ... # type: Any
heading = ... # type: Any
items = ... # type: Any
def __init__(self, formatter, parent, heading=None) -> None: ...
def __init__(self, formatter, parent, heading=...) -> None: ...
def format_help(self): ...
def start_section(self, heading): ...
def end_section(self): ...
def add_text(self, text): ...
def add_usage(self, usage, actions, groups, prefix=None): ...
def add_usage(self, usage, actions, groups, prefix=...): ...
def add_argument(self, action): ...
def add_arguments(self, actions): ...
def format_help(self): ...
@@ -52,58 +52,58 @@ class Action(_AttributeHolder):
required = ... # type: Any
help = ... # type: Any
metavar = ... # type: Any
def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None,
choices=None, required=False, help=None, metavar=None): ...
def __call__(self, parser, namespace, values, option_string=None): ...
def __init__(self, option_strings, dest, nargs=..., const=..., default=..., type=...,
choices=..., required=..., help=..., metavar=...): ...
def __call__(self, parser, namespace, values, option_string=...): ...
class _StoreAction(Action):
def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None,
choices=None, required=False, help=None, metavar=None): ...
def __call__(self, parser, namespace, values, option_string=None): ...
def __init__(self, option_strings, dest, nargs=..., const=..., default=..., type=...,
choices=..., required=..., help=..., metavar=...): ...
def __call__(self, parser, namespace, values, option_string=...): ...
class _StoreConstAction(Action):
def __init__(self, option_strings, dest, const, default=None, required=False, help=None,
metavar=None): ...
def __call__(self, parser, namespace, values, option_string=None): ...
def __init__(self, option_strings, dest, const, default=..., required=..., help=...,
metavar=...): ...
def __call__(self, parser, namespace, values, option_string=...): ...
class _StoreTrueAction(_StoreConstAction):
def __init__(self, option_strings, dest, default=False, required=False, help=None) -> None: ...
def __init__(self, option_strings, dest, default=..., required=..., help=...) -> None: ...
class _StoreFalseAction(_StoreConstAction):
def __init__(self, option_strings, dest, default=True, required=False, help=None) -> None: ...
def __init__(self, option_strings, dest, default=..., required=..., help=...) -> None: ...
class _AppendAction(Action):
def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None,
choices=None, required=False, help=None, metavar=None): ...
def __call__(self, parser, namespace, values, option_string=None): ...
def __init__(self, option_strings, dest, nargs=..., const=..., default=..., type=...,
choices=..., required=..., help=..., metavar=...): ...
def __call__(self, parser, namespace, values, option_string=...): ...
class _AppendConstAction(Action):
def __init__(self, option_strings, dest, const, default=None, required=False, help=None,
metavar=None): ...
def __call__(self, parser, namespace, values, option_string=None): ...
def __init__(self, option_strings, dest, const, default=..., required=..., help=...,
metavar=...): ...
def __call__(self, parser, namespace, values, option_string=...): ...
class _CountAction(Action):
def __init__(self, option_strings, dest, default=None, required=False, help=None) -> None: ...
def __call__(self, parser, namespace, values, option_string=None): ...
def __init__(self, option_strings, dest, default=..., required=..., help=...) -> None: ...
def __call__(self, parser, namespace, values, option_string=...): ...
class _HelpAction(Action):
def __init__(self, option_strings, dest=..., default=..., help=None) -> None: ...
def __call__(self, parser, namespace, values, option_string=None): ...
def __init__(self, option_strings, dest=..., default=..., help=...) -> None: ...
def __call__(self, parser, namespace, values, option_string=...): ...
class _VersionAction(Action):
version = ... # type: Any
def __init__(self, option_strings, version=None, dest=..., default=..., help='') -> None: ...
def __call__(self, parser, namespace, values, option_string=None): ...
def __init__(self, option_strings, version=..., dest=..., default=..., help=...) -> None: ...
def __call__(self, parser, namespace, values, option_string=...): ...
class _SubParsersAction(Action):
class _ChoicesPseudoAction(Action):
def __init__(self, name, help) -> None: ...
def __init__(self, option_strings, prog, parser_class, dest=..., help=None, metavar=None) -> None: ...
def __init__(self, option_strings, prog, parser_class, dest=..., help=..., metavar=...) -> None: ...
def add_parser(self, name, **kwargs): ...
def __call__(self, parser, namespace, values, option_string=None): ...
def __call__(self, parser, namespace, values, option_string=...): ...
class FileType:
def __init__(self, mode='', bufsize=-1) -> None: ...
def __init__(self, mode=..., bufsize=...) -> None: ...
def __call__(self, string): ...
class Namespace(_AttributeHolder):
@@ -124,26 +124,26 @@ class _ActionsContainer:
def get_default(self, dest): ...
def add_argument(self,
*args: str,
action: str = None,
nargs: str = None,
const: Any = None,
default: Any = None,
type: Any = None,
choices: Any = None, # TODO: Container?
required: bool = None,
help: str = None,
metavar: str = None,
dest: str = None) -> None: ...
action: str = ...,
nargs: str = ...,
const: Any = ...,
default: Any = ...,
type: Any = ...,
choices: Any = ..., # TODO: Container?
required: bool = ...,
help: str = ...,
metavar: str = ...,
dest: str = ...) -> None: ...
def add_argument_group(self, *args, **kwargs): ...
def add_mutually_exclusive_group(self, **kwargs): ...
class _ArgumentGroup(_ActionsContainer):
title = ... # type: Any
def __init__(self, container, title=None, description=None, **kwargs) -> None: ...
def __init__(self, container, title=..., description=..., **kwargs) -> None: ...
class _MutuallyExclusiveGroup(_ArgumentGroup):
required = ... # type: Any
def __init__(self, container, required=False) -> None: ...
def __init__(self, container, required=...) -> None: ...
class ArgumentParser(_AttributeHolder, _ActionsContainer):
prog = ... # type: Any
@@ -153,18 +153,18 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
formatter_class = ... # type: Any
fromfile_prefix_chars = ... # type: Any
add_help = ... # type: Any
def __init__(self, prog=None, usage=None, description=None, epilog=None, version=None,
parents=..., formatter_class=..., prefix_chars='', fromfile_prefix_chars=None,
argument_default=None, conflict_handler='', add_help=True): ...
def __init__(self, prog=..., usage=..., description=..., epilog=..., version=...,
parents=..., formatter_class=..., prefix_chars=..., fromfile_prefix_chars=...,
argument_default=..., conflict_handler=..., add_help=...): ...
def add_subparsers(self, **kwargs): ...
def parse_args(self, args: Sequence[str] = None, namespace=None): ...
def parse_known_args(self, args=None, namespace=None): ...
def parse_args(self, args: Sequence[str] = ..., namespace=...): ...
def parse_known_args(self, args=..., namespace=...): ...
def convert_arg_line_to_args(self, arg_line): ...
def format_usage(self): ...
def format_help(self): ...
def format_version(self): ...
def print_usage(self, file=None): ...
def print_help(self, file=None): ...
def print_version(self, file=None): ...
def exit(self, status=0, message=None): ...
def print_usage(self, file=...): ...
def print_help(self, file=...): ...
def print_version(self, file=...): ...
def exit(self, status=..., message=...): ...
def error(self, message): ...

View File

@@ -4,18 +4,18 @@
from typing import IO
def b64encode(s: str, altchars: str = None) -> str: ...
def b64decode(s: str, altchars: str = None,
validate: bool = False) -> str: ...
def b64encode(s: str, altchars: str = ...) -> str: ...
def b64decode(s: str, altchars: str = ...,
validate: bool = ...) -> str: ...
def standard_b64encode(s: str) -> str: ...
def standard_b64decode(s: str) -> str: ...
def urlsafe_b64encode(s: str) -> str: ...
def urlsafe_b64decode(s: str) -> str: ...
def b32encode(s: str) -> str: ...
def b32decode(s: str, casefold: bool = False,
map01: str = None) -> str: ...
def b32decode(s: str, casefold: bool = ...,
map01: str = ...) -> str: ...
def b16encode(s: str) -> str: ...
def b16decode(s: str, casefold: bool = False) -> str: ...
def b16decode(s: str, casefold: bool = ...) -> str: ...
def decode(input: IO[str], output: IO[str]) -> None: ...
def decodebytes(s: str) -> str: ...

View File

@@ -32,15 +32,15 @@ _incremental_encoder_type = Callable[[], 'IncrementalEncoder'] # signature of In
_incremental_decode_type = Callable[[], 'IncrementalDecoder'] # signature of IncrementalDecoder __init__
def encode(obj: _decoded, encoding: str = 'utf-8', errors: str = 'strict') -> _encoded:
def encode(obj: _decoded, encoding: str = ..., errors: str = ...) -> _encoded:
...
def decode(obj: _encoded, encoding: str = 'utf-8', errors: str = 'strict') -> _decoded:
def decode(obj: _encoded, encoding: str = ..., errors: str = ...) -> _decoded:
...
def lookup(encoding: str) -> 'CodecInfo':
...
class CodecInfo(Tuple[_encode_type, _decode_type, _stream_reader_type, _stream_writer_type]):
def __init__(self, encode: _encode_type, decode: _decode_type, streamreader: _stream_reader_type = None, streamwriter: _stream_writer_type = None, incrementalencoder: _incremental_encoder_type = None, incrementaldecoder: _incremental_decode_type = None, name: str = None) -> None:
def __init__(self, encode: _encode_type, decode: _decode_type, streamreader: _stream_reader_type = ..., streamwriter: _stream_writer_type = ..., incrementalencoder: _incremental_encoder_type = ..., incrementaldecoder: _incremental_decode_type = ..., name: str = ...) -> None:
self.encode = encode
self.decode = decode
self.streamreader = streamreader
@@ -65,15 +65,15 @@ def getwriter(encoding: str) -> _stream_writer_type:
def register(search_function: Callable[[str], CodecInfo]) -> None:
...
def open(filename: str, mode: str = 'r', encoding: str = None, errors: str = 'strict', buffering: int = 1) -> StreamReaderWriter:
def open(filename: str, mode: str = ..., encoding: str = ..., errors: str = ..., buffering: int = ...) -> StreamReaderWriter:
...
def EncodedFile(file: BinaryIO, data_encoding: str, file_encoding: str = None, errors = 'strict') -> 'StreamRecoder':
def EncodedFile(file: BinaryIO, data_encoding: str, file_encoding: str = ..., errors = ...) -> 'StreamRecoder':
...
def iterencode(iterator: Iterable[_decoded], encoding: str, errors: str = 'strict') -> Iterator[_encoded]:
def iterencode(iterator: Iterable[_decoded], encoding: str, errors: str = ...) -> Iterator[_encoded]:
...
def iterdecode(iterator: Iterable[_encoded], encoding: str, errors: str = 'strict') -> Iterator[_decoded]:
def iterdecode(iterator: Iterable[_encoded], encoding: str, errors: str = ...) -> Iterator[_decoded]:
...
BOM = b''
@@ -109,16 +109,16 @@ def backslashreplace_errors(exception: UnicodeError) -> Tuple[Union[str, bytes],
class Codec:
# These are sort of @abstractmethod but sort of not.
# The StreamReader and StreamWriter subclasses only implement one.
def encode(self, input: _decoded, errors: str = 'strict') -> Tuple[_encoded, int]:
def encode(self, input: _decoded, errors: str = ...) -> Tuple[_encoded, int]:
...
def decode(self, input: _encoded, errors: str = 'strict') -> Tuple[_decoded, int]:
def decode(self, input: _encoded, errors: str = ...) -> Tuple[_decoded, int]:
...
class IncrementalEncoder:
def __init__(self, errors: str = 'strict') -> None:
def __init__(self, errors: str = ...) -> None:
self.errors = errors
@abstractmethod
def encode(self, object: _decoded, final: bool = False) -> _encoded:
def encode(self, object: _decoded, final: bool = ...) -> _encoded:
...
def reset(self) -> None:
...
@@ -129,10 +129,10 @@ class IncrementalEncoder:
...
class IncrementalDecoder:
def __init__(self, errors: str = 'strict') -> None:
def __init__(self, errors: str = ...) -> None:
self.errors = errors
@abstractmethod
def decode(self, object: _encoded, final: bool = False) -> _decoded:
def decode(self, object: _encoded, final: bool = ...) -> _decoded:
...
def reset(self) -> None:
...
@@ -143,28 +143,28 @@ class IncrementalDecoder:
# These are not documented but used in encodings/*.py implementations.
class BufferedIncrementalEncoder(IncrementalEncoder):
def __init__(self, errors: str = 'strict') -> None:
def __init__(self, errors: str = ...) -> None:
IncrementalEncoder.__init__(self, errors)
self.buffer = ''
@abstractmethod
def _buffer_encode(self, input: _decoded, errors: str, final: bool) -> _encoded:
...
def encode(self, input: _decoded, final: bool = False) -> _encoded:
def encode(self, input: _decoded, final: bool = ...) -> _encoded:
...
class BufferedIncrementalDecoder(IncrementalDecoder):
def __init__(self, errors: str = 'strict') -> None:
def __init__(self, errors: str = ...) -> None:
IncrementalDecoder.__init__(self, errors)
self.buffer = b''
@abstractmethod
def _buffer_decode(self, input: _encoded, errors: str, final: bool) -> Tuple[_decoded, int]:
...
def decode(self, object: _encoded, final: bool = False) -> _decoded:
def decode(self, object: _encoded, final: bool = ...) -> _decoded:
...
# TODO: it is not possible to specify the requirement that all other
# attributes and methods are passed-through from the stream.
class StreamWriter(Codec):
def __init__(self, stream: BinaryIO, errors: str = 'strict') -> None:
def __init__(self, stream: BinaryIO, errors: str = ...) -> None:
self.errors = errors
def write(self, obj: _decoded) -> None:
...
@@ -174,21 +174,21 @@ class StreamWriter(Codec):
...
class StreamReader(Codec):
def __init__(self, stream: BinaryIO, errors: str = 'strict') -> None:
def __init__(self, stream: BinaryIO, errors: str = ...) -> None:
self.errors = errors
def read(self, size: int = -1, chars: int = -1, firstline: bool = False) -> _decoded:
def read(self, size: int = ..., chars: int = ..., firstline: bool = ...) -> _decoded:
...
def readline(self, size: int = -1, keepends: bool = True) -> _decoded:
def readline(self, size: int = ..., keepends: bool = ...) -> _decoded:
...
def readlines(self, sizehint: int = -1, keepends: bool = True) -> List[_decoded]:
def readlines(self, sizehint: int = ..., keepends: bool = ...) -> List[_decoded]:
...
def reset(self) -> None:
...
class StreamReaderWriter:
def __init__(self, stream: BinaryIO, Reader: _stream_reader_type, Writer: _stream_writer_type, errors: str = 'strict') -> None:
def __init__(self, stream: BinaryIO, Reader: _stream_reader_type, Writer: _stream_writer_type, errors: str = ...) -> None:
...
class StreamRecoder(BinaryIO):
def __init__(self, stream: BinaryIO, encode: _encode_type, decode: _decode_type, Reader: _stream_reader_type, Writer: _stream_writer_type, errors: str = 'strict') -> None:
def __init__(self, stream: BinaryIO, encode: _encode_type, decode: _decode_type, Reader: _stream_reader_type, Writer: _stream_writer_type, errors: str = ...) -> None:
...

View File

@@ -25,8 +25,8 @@ namedtuple = object()
MutableMapping = typing.MutableMapping
class deque(Sized, Iterable[_T], Reversible[_T], Generic[_T]):
def __init__(self, iterable: Iterable[_T] = None,
maxlen: int = None) -> None: ...
def __init__(self, iterable: Iterable[_T] = ...,
maxlen: int = ...) -> None: ...
@property
def maxlen(self) -> Optional[int]: ...
def append(self, x: _T) -> None: ...
@@ -73,8 +73,8 @@ class Counter(Dict[_T, int], Generic[_T]):
Iterable[_T]]) -> None: ...
class OrderedDict(Dict[_KT, _VT], Generic[_KT, _VT]):
def popitem(self, last: bool = True) -> Tuple[_KT, _VT]: ...
def move_to_end(self, key: _KT, last: bool = True) -> None: ...
def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...
def move_to_end(self, key: _KT, last: bool = ...) -> None: ...
class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]):
default_factory = ... # type: Callable[[], _VT]

View File

@@ -2,6 +2,6 @@
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
def compile_dir(dir, maxlevels=10, ddir=None, force=0, rx=None, quiet=0): ...
def compile_file(fullname, ddir=None, force=0, rx=None, quiet=0): ...
def compile_path(skip_curdir=1, maxlevels=0, force=0, quiet=0): ...
def compile_dir(dir, maxlevels=..., ddir=..., force=..., rx=..., quiet=...): ...
def compile_file(fullname, ddir=..., force=..., rx=..., quiet=...): ...
def compile_path(skip_curdir=..., maxlevels=..., force=..., quiet=...): ...

View File

@@ -68,8 +68,8 @@ class DictReader:
dialect = ... # type: _Dialect
line_num = ... # type: int
fieldnames = ... # type: Sequence[Any]
def __init__(self, f: Iterable[str], fieldnames: Sequence[Any] = None, restkey=None,
restval=None, dialect: _Dialect = '', *args, **kwds) -> None: ...
def __init__(self, f: Iterable[str], fieldnames: Sequence[Any] = ..., restkey=...,
restval=..., dialect: _Dialect = ..., *args, **kwds) -> None: ...
def __iter__(self): ...
def __next__(self): ...
@@ -80,8 +80,8 @@ class DictWriter:
restval = ... # type: Any
extrasaction = ... # type: Any
writer = ... # type: Any
def __init__(self, f: Any, fieldnames: Sequence[Any], restval='', extrasaction: str = ...,
dialect: _Dialect = '', *args, **kwds) -> None: ...
def __init__(self, f: Any, fieldnames: Sequence[Any], restval=..., extrasaction: str = ...,
dialect: _Dialect = ..., *args, **kwds) -> None: ...
def writeheader(self) -> None: ...
def writerow(self, rowdict: _DictRow) -> None: ...
def writerows(self, rowdicts: Iterable[_DictRow]) -> None: ...
@@ -89,5 +89,5 @@ class DictWriter:
class Sniffer:
preferred = ... # type: Any
def __init__(self) -> None: ...
def sniff(self, sample: str, delimiters: str = None) -> Dialect: ...
def sniff(self, sample: str, delimiters: str = ...) -> Dialect: ...
def has_header(self, sample: str) -> bool: ...

View File

@@ -11,9 +11,9 @@ from typing import (
_T = TypeVar('_T')
class SequenceMatcher(Generic[_T]):
def __init__(self, isjunk: Callable[[_T], bool] = None,
a: Sequence[_T] = None, b: Sequence[_T] = None,
autojunk: bool = True) -> None: ...
def __init__(self, isjunk: Callable[[_T], bool] = ...,
a: Sequence[_T] = ..., b: Sequence[_T] = ...,
autojunk: bool = ...) -> None: ...
def set_seqs(self, a: Sequence[_T], b: Sequence[_T]) -> None: ...
def set_seq1(self, a: Sequence[_T]) -> None: ...
def set_seq2(self, b: Sequence[_T]) -> None: ...
@@ -21,43 +21,43 @@ class SequenceMatcher(Generic[_T]):
bhi: int) -> Tuple[int, int, int]: ...
def get_matching_blocks(self) -> List[Tuple[int, int, int]]: ...
def get_opcodes(self) -> List[Tuple[str, int, int, int, int]]: ...
def get_grouped_opcodes(self, n: int = 3
def get_grouped_opcodes(self, n: int = ...
) -> Iterable[Tuple[str, int, int, int, int]]: ...
def ratio(self) -> float: ...
def quick_ratio(self) -> float: ...
def real_quick_ratio(self) -> float: ...
def get_close_matches(word: Sequence[_T], possibilities: List[Sequence[_T]],
n: int = 3, cutoff: float = 0.6) -> List[Sequence[_T]]: ...
n: int = ..., cutoff: float = ...) -> List[Sequence[_T]]: ...
class Differ:
def __init__(self, linejunk: Callable[[str], bool] = None,
charjunk: Callable[[str], bool] = None) -> None: ...
def __init__(self, linejunk: Callable[[str], bool] = ...,
charjunk: Callable[[str], bool] = ...) -> None: ...
def compare(self, a: Sequence[str], b: Sequence[str]) -> Iterable[str]: ...
def IS_LINE_JUNK(str) -> bool: ...
def IS_CHARACTER_JUNK(str) -> bool: ...
def unified_diff(a: Sequence[str], b: Sequence[str], fromfile: str = '',
tofile: str = '', fromfiledate: str = '', tofiledate: str = '',
n: int = 3, lineterm: str = '\n') -> Iterable[str]: ...
def context_diff(a: Sequence[str], b: Sequence[str], fromfile: str='',
tofile: str = '', fromfiledate: str = '', tofiledate: str = '',
n: int = 3, lineterm: str = '\n') -> Iterable[str]: ...
def unified_diff(a: Sequence[str], b: Sequence[str], fromfile: str = ...,
tofile: str = ..., fromfiledate: str = ..., tofiledate: str = ...,
n: int = ..., lineterm: str = ...) -> Iterable[str]: ...
def context_diff(a: Sequence[str], b: Sequence[str], fromfile: str=...,
tofile: str = ..., fromfiledate: str = ..., tofiledate: str = ...,
n: int = ..., lineterm: str = ...) -> Iterable[str]: ...
def ndiff(a: Sequence[str], b: Sequence[str],
linejunk: Callable[[str], bool] = None,
charjunk: Callable[[str], bool] = IS_CHARACTER_JUNK
linejunk: Callable[[str], bool] = ...,
charjunk: Callable[[str], bool] = ...
) -> Iterable[str]: ...
class HtmlDiff(object):
def __init__(self, tabsize: int = 8, wrapcolumn: int = None,
linejunk: Callable[[str], bool] = None,
charjunk: Callable[[str], bool] = IS_CHARACTER_JUNK
def __init__(self, tabsize: int = ..., wrapcolumn: int = ...,
linejunk: Callable[[str], bool] = ...,
charjunk: Callable[[str], bool] = ...
) -> None: ...
def make_file(self, fromlines: Sequence[str], tolines: Sequence[str],
fromdesc: str = '', todesc: str = '', context: bool = False,
numlines: int = 5) -> str: ...
fromdesc: str = ..., todesc: str = ..., context: bool = ...,
numlines: int = ...) -> str: ...
def make_table(self, fromlines: Sequence[str], tolines: Sequence[str],
fromdesc: str = '', todesc: str = '', context: bool = False,
numlines: int = 5) -> str: ...
fromdesc: str = ..., todesc: str = ..., context: bool = ...,
numlines: int = ...) -> str: ...
def restore(delta: Iterable[str], which: int) -> Iterable[int]: ...

View File

@@ -5,7 +5,7 @@
from typing import Any
class Version:
def __init__(self, vstring=None) -> None: ...
def __init__(self, vstring=...) -> None: ...
class StrictVersion(Version):
version_re = ... # type: Any
@@ -16,7 +16,7 @@ class StrictVersion(Version):
class LooseVersion(Version):
component_re = ... # type: Any
def __init__(self, vstring=None) -> None: ...
def __init__(self, vstring=...) -> None: ...
vstring = ... # type: Any
version = ... # type: Any
def parse(self, vstring): ...

View File

@@ -5,4 +5,4 @@
from email.mime.nonmultipart import MIMENonMultipart
class MIMEText(MIMENonMultipart):
def __init__(self, _text, _subtype='', _charset='') -> None: ...
def __init__(self, _text, _subtype=..., _charset=...) -> None: ...

View File

@@ -5,4 +5,4 @@
from email.mime.base import MIMEBase
class MIMEMultipart(MIMEBase):
def __init__(self, _subtype='', boundary=None, _subparts=None, **_params) -> None: ...
def __init__(self, _subtype=..., boundary=..., _subparts=..., **_params) -> None: ...

View File

@@ -5,4 +5,4 @@
from email.mime.nonmultipart import MIMENonMultipart
class MIMEText(MIMENonMultipart):
def __init__(self, _text, _subtype='', _charset='') -> None: ...
def __init__(self, _text, _subtype=..., _charset=...) -> None: ...

View File

@@ -10,5 +10,5 @@ class StreamReader(codecs.StreamReader):
pass
def getregentry() -> codecs.CodecInfo: pass
def encode(input: str, errors: str = 'strict') -> bytes: pass
def decode(input: bytes, errors: str = 'strict') -> str: pass
def encode(input: str, errors: str = ...) -> bytes: pass
def decode(input: bytes, errors: str = ...) -> str: pass

View File

@@ -10,7 +10,7 @@ _AnyCallable = Callable[..., Any]
_T = TypeVar("_T")
def reduce(function: Callable[[_T], _T],
sequence: Iterator[_T], initial: Optional[_T] = None) -> _T: ...
sequence: Iterator[_T], initial: Optional[_T] = ...) -> _T: ...
WRAPPER_ASSIGNMENTS = ... # type: Sequence[str]
WRAPPER_UPDATES = ... # type: Sequence[str]

View File

@@ -4,5 +4,5 @@ from typing import Any, IO
class GetPassWarning(UserWarning): ...
def getpass(prompt: str = 'Password: ', stream: IO[Any] = None) -> str: ...
def getpass(prompt: str = ..., stream: IO[Any] = ...) -> str: ...
def getuser() -> str: ...

View File

@@ -2,9 +2,9 @@
from typing import Any, IO, List, Optional, Union
def bindtextdomain(domain: str, localedir: str = None) -> str: ...
def bind_textdomain_codeset(domain: str, codeset: str = None) -> str: ...
def textdomain(domain: str = None) -> str: ...
def bindtextdomain(domain: str, localedir: str = ...) -> str: ...
def bind_textdomain_codeset(domain: str, codeset: str = ...) -> str: ...
def textdomain(domain: str = ...) -> str: ...
def gettext(message: str) -> str: ...
def lgettext(message: str) -> str: ...
def dgettext(domain: str, message: str) -> str: ...
@@ -27,14 +27,14 @@ class Translations(object):
def charset(self) -> Any: ...
def output_charset(self) -> Any: ...
def set_output_charset(self, charset: Any) -> None: ...
def install(self, unicode: bool = None, names: Any = None) -> None: ...
def install(self, unicode: bool = ..., names: Any = ...) -> None: ...
# TODO: NullTranslations, GNUTranslations
def find(domain: str, localedir: str = None, languages: List[str] = None,
all: Any = None) -> Optional[Union[str, List[str]]]: ...
def find(domain: str, localedir: str = ..., languages: List[str] = ...,
all: Any = ...) -> Optional[Union[str, List[str]]]: ...
def translation(domain: str, localedir: str = None, languages: List[str] = None,
class_: Any = None, fallback: Any = None, codeset: Any = None) -> Translations: ...
def install(domain: str, localedir: str = None, unicode: Any = None, codeset: Any = None,
names: Any = None) -> None: ...
def translation(domain: str, localedir: str = ..., languages: List[str] = ...,
class_: Any = ..., fallback: Any = ..., codeset: Any = ...) -> Translations: ...
def install(domain: str, localedir: str = ..., unicode: Any = ..., codeset: Any = ...,
names: Any = ...) -> None: ...

View File

@@ -18,14 +18,14 @@ class GzipFile(io.BufferedIOBase):
fileobj = ... # type: Any
offset = ... # type: Any
mtime = ... # type: Any
def __init__(self, filename: str = None, mode: str = None, compresslevel: int = 9,
fileobj: IO[str] = None, mtime: float = None) -> None: ...
def __init__(self, filename: str = ..., mode: str = ..., compresslevel: int = ...,
fileobj: IO[str] = ..., mtime: float = ...) -> None: ...
@property
def filename(self): ...
size = ... # type: Any
crc = ... # type: Any
def write(self, data): ...
def read(self, size=-1): ...
def read(self, size=...): ...
@property
def closed(self): ...
def close(self): ...
@@ -35,7 +35,7 @@ class GzipFile(io.BufferedIOBase):
def readable(self): ...
def writable(self): ...
def seekable(self): ...
def seek(self, offset, whence=0): ...
def readline(self, size=-1): ...
def seek(self, offset, whence=...): ...
def readline(self, size=...): ...
def open(filename: str, mode: str = '', compresslevel: int = ...) -> GzipFile: ...
def open(filename: str, mode: str = ..., compresslevel: int = ...) -> GzipFile: ...

View File

@@ -11,17 +11,17 @@ class _hash(object):
def hexdigest(self) -> str: ...
def copy(self) -> _hash: ...
def new(algo: str = None) -> _hash: ...
def new(algo: str = ...) -> _hash: ...
def md5(s: str = None) -> _hash: ...
def sha1(s: str = None) -> _hash: ...
def sha224(s: str = None) -> _hash: ...
def sha256(s: str = None) -> _hash: ...
def sha384(s: str = None) -> _hash: ...
def sha512(s: str = None) -> _hash: ...
def md5(s: str = ...) -> _hash: ...
def sha1(s: str = ...) -> _hash: ...
def sha224(s: str = ...) -> _hash: ...
def sha256(s: str = ...) -> _hash: ...
def sha384(s: str = ...) -> _hash: ...
def sha512(s: str = ...) -> _hash: ...
algorithms = ... # type: Tuple[str, ...]
algorithms_guaranteed = ... # type: Tuple[str, ...]
algorithms_available = ... # type: Tuple[str, ...]
def pbkdf2_hmac(name: str, password: str, salt: str, rounds: int, dklen: int = None) -> str: ...
def pbkdf2_hmac(name: str, password: str, salt: str, rounds: int, dklen: int = ...) -> str: ...

View File

@@ -8,4 +8,4 @@ class HMAC:
def hexdigest(self) -> str: ...
def copy(self) -> HMAC: ...
def new(key: str, msg: str = None, digestmod: Any = None) -> HMAC: ...
def new(key: str, msg: str = ..., digestmod: Any = ...) -> HMAC: ...

View File

@@ -1,3 +1,3 @@
import types
def import_module(name: str, package: str = None) -> types.ModuleType: ...
def import_module(name: str, package: str = ...) -> types.ModuleType: ...

View File

@@ -8,4 +8,4 @@ class _Frame:
_FrameRecord = Tuple[_Frame, str, int, str, List[str], int]
def currentframe() -> _FrameRecord: ...
def stack(context: int = None) -> List[_FrameRecord]: ...
def stack(context: int = ...) -> List[_FrameRecord]: ...

View File

@@ -9,16 +9,16 @@ DEFAULT_BUFFER_SIZE = 0
from typing import List, BinaryIO, TextIO, IO, overload, Iterator, Iterable, Any, Union
def open(file: Union[str, unicode, int],
mode: unicode = 'r', buffering: int = -1, encoding: unicode = None,
errors: unicode = None, newline: unicode = None,
closefd: bool = True) -> IO[Any]: ...
mode: unicode = ..., buffering: int = ..., encoding: unicode = ...,
errors: unicode = ..., newline: unicode = ...,
closefd: bool = ...) -> IO[Any]: ...
class IOBase:
# TODO
...
class BytesIO(BinaryIO):
def __init__(self, initial_bytes: str = b'') -> None: ...
def __init__(self, initial_bytes: str = ...) -> None: ...
# TODO getbuffer
# TODO see comments in BinaryIO for missing functionality
def close(self) -> None: ...
@@ -26,14 +26,14 @@ class BytesIO(BinaryIO):
def fileno(self) -> int: ...
def flush(self) -> None: ...
def isatty(self) -> bool: ...
def read(self, n: int = -1) -> str: ...
def read(self, n: int = ...) -> str: ...
def readable(self) -> bool: ...
def readline(self, limit: int = -1) -> str: ...
def readlines(self, hint: int = -1) -> List[str]: ...
def seek(self, offset: int, whence: int = 0) -> None: ...
def readline(self, limit: int = ...) -> str: ...
def readlines(self, hint: int = ...) -> List[str]: ...
def seek(self, offset: int, whence: int = ...) -> None: ...
def seekable(self) -> bool: ...
def tell(self) -> int: ...
def truncate(self, size: int = None) -> int: ...
def truncate(self, size: int = ...) -> int: ...
def writable(self) -> bool: ...
def write(self, s: str) -> None: ...
def writelines(self, lines: Iterable[str]) -> None: ...
@@ -45,22 +45,22 @@ class BytesIO(BinaryIO):
def __exit__(self, type, value, traceback) -> bool: ...
class StringIO(TextIO):
def __init__(self, initial_value: unicode = '',
newline: unicode = None) -> None: ...
def __init__(self, initial_value: unicode = ...,
newline: unicode = ...) -> None: ...
# TODO see comments in BinaryIO for missing functionality
def close(self) -> None: ...
def closed(self) -> bool: ...
def fileno(self) -> int: ...
def flush(self) -> None: ...
def isatty(self) -> bool: ...
def read(self, n: int = -1) -> unicode: ...
def read(self, n: int = ...) -> unicode: ...
def readable(self) -> bool: ...
def readline(self, limit: int = -1) -> unicode: ...
def readlines(self, hint: int = -1) -> List[unicode]: ...
def seek(self, offset: int, whence: int = 0) -> None: ...
def readline(self, limit: int = ...) -> unicode: ...
def readlines(self, hint: int = ...) -> List[unicode]: ...
def seek(self, offset: int, whence: int = ...) -> None: ...
def seekable(self) -> bool: ...
def tell(self) -> int: ...
def truncate(self, size: int = None) -> int: ...
def truncate(self, size: int = ...) -> int: ...
def writable(self) -> bool: ...
def write(self, s: unicode) -> None: ...
def writelines(self, lines: Iterable[unicode]) -> None: ...
@@ -72,24 +72,24 @@ class StringIO(TextIO):
class TextIOWrapper(TextIO):
# write_through is undocumented but used by subprocess
def __init__(self, buffer: IO[str], encoding: unicode = None,
errors: unicode = None, newline: unicode = None,
line_buffering: bool = False,
write_through: bool = True) -> None: ...
def __init__(self, buffer: IO[str], encoding: unicode = ...,
errors: unicode = ..., newline: unicode = ...,
line_buffering: bool = ...,
write_through: bool = ...) -> None: ...
# TODO see comments in BinaryIO for missing functionality
def close(self) -> None: ...
def closed(self) -> bool: ...
def fileno(self) -> int: ...
def flush(self) -> None: ...
def isatty(self) -> bool: ...
def read(self, n: int = -1) -> unicode: ...
def read(self, n: int = ...) -> unicode: ...
def readable(self) -> bool: ...
def readline(self, limit: int = -1) -> unicode: ...
def readlines(self, hint: int = -1) -> List[unicode]: ...
def seek(self, offset: int, whence: int = 0) -> None: ...
def readline(self, limit: int = ...) -> unicode: ...
def readlines(self, hint: int = ...) -> List[unicode]: ...
def seek(self, offset: int, whence: int = ...) -> None: ...
def seekable(self) -> bool: ...
def tell(self) -> int: ...
def truncate(self, size: int = None) -> int: ...
def truncate(self, size: int = ...) -> int: ...
def writable(self) -> bool: ...
def write(self, s: unicode) -> None: ...
def writelines(self, lines: Iterable[unicode]) -> None: ...

View File

@@ -6,7 +6,7 @@ class JSONDecodeError(object):
def loads(self, s: str) -> Any: ...
def load(self, fp: IO[str]) -> Any: ...
def dumps(obj: Any, sort_keys: bool = None, indent: int = None) -> str: ...
def dumps(obj: Any, sort_keys: bool = ..., indent: int = ...) -> str: ...
def dump(obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ...
def loads(s: str) -> Any: ...
def load(fp: IO[str]) -> Any: ...

View File

@@ -37,7 +37,7 @@ class LogRecord:
processName = ... # type: Any
process = ... # type: Any
def __init__(self, name: str, level: int, pathname: str, lineno: int, msg: str,
args: Sequence[Any], exc_info: Tuple[Any, Any, Any], func: str = None) -> None: ...
args: Sequence[Any], exc_info: Tuple[Any, Any, Any], func: str = ...) -> None: ...
def getMessage(self) -> str: ...
def makeLogRecord(dict: Dict[str, Any]) -> LogRecord: ...
@@ -69,10 +69,10 @@ BASIC_FORMAT = ... # type: Any
class Formatter:
converter = ... # type: Any
datefmt = ... # type: Any
def __init__(self, fmt: str = None, datefmt: str = None) -> None: ...
def __init__(self, fmt: str = ..., datefmt: str = ...) -> None: ...
default_time_format = ... # type: Any
default_msec_format = ... # type: Any
def formatTime(self, record, datefmt=None): ...
def formatTime(self, record, datefmt=...): ...
def formatException(self, ei): ...
def usesTime(self): ...
def formatMessage(self, record): ...
@@ -81,7 +81,7 @@ class Formatter:
class BufferingFormatter:
linefmt = ... # type: Any
def __init__(self, linefmt=None) -> None: ...
def __init__(self, linefmt=...) -> None: ...
def formatHeader(self, records): ...
def formatFooter(self, records): ...
def format(self, records): ...
@@ -89,7 +89,7 @@ class BufferingFormatter:
class Filter:
name = ... # type: Any
nlen = ... # type: Any
def __init__(self, name: str = '') -> None: ...
def __init__(self, name: str = ...) -> None: ...
def filter(self, record: LogRecord) -> int: ...
class Filterer:
@@ -122,7 +122,7 @@ class Handler(Filterer):
class StreamHandler(Handler):
terminator = ... # type: Any
stream = ... # type: Any
def __init__(self, stream=None) -> None: ...
def __init__(self, stream=...) -> None: ...
def flush(self): ...
def emit(self, record): ...
@@ -132,7 +132,7 @@ class FileHandler(StreamHandler):
encoding = ... # type: Any
delay = ... # type: Any
stream = ... # type: Any
def __init__(self, filename: str, mode: str = ..., encoding: str = None, delay: int = ...) -> None: ...
def __init__(self, filename: str, mode: str = ..., encoding: str = ..., delay: int = ...) -> None: ...
def close(self): ...
def emit(self, record): ...
@@ -180,8 +180,8 @@ class Logger(Filterer):
fatal = ... # type: Any
def log(self, level: int, msg: str, *args, **kwargs) -> None: ...
def findCaller(self) -> Tuple[str, int, str]: ...
def makeRecord(self, name, level, fn, lno, msg, args, exc_info, func=None, extra=None,
sinfo=None): ...
def makeRecord(self, name, level, fn, lno, msg, args, exc_info, func=..., extra=...,
sinfo=...): ...
def handle(self, record): ...
def addHandler(self, hdlr: Handler) -> None: ...
def removeHandler(self, hdlr: Handler) -> None: ...
@@ -213,7 +213,7 @@ class LoggerAdapter:
def hasHandlers(self): ...
def basicConfig(**kwargs) -> None: ...
def getLogger(name: str = None) -> Logger: ...
def getLogger(name: str = ...) -> Logger: ...
def critical(msg: str, *args, **kwargs) -> None: ...
fatal = ... # type: Any

View File

@@ -18,7 +18,7 @@ class BaseRotatingHandler(logging.FileHandler):
encoding = ... # type: Any
namer = ... # type: Any
rotator = ... # type: Any
def __init__(self, filename, mode, encoding=None, delay=0) -> None: ...
def __init__(self, filename, mode, encoding=..., delay=...) -> None: ...
def emit(self, record): ...
def rotation_filename(self, default_name): ...
def rotate(self, source, dest): ...
@@ -27,7 +27,7 @@ class RotatingFileHandler(BaseRotatingHandler):
maxBytes = ... # type: Any
backupCount = ... # type: Any
def __init__(self, filename: str, mode: str = ..., maxBytes: int = ..., backupCount:int = ...,
encoding: str = None, delay: int = ...) -> None: ...
encoding: str = ..., delay: int = ...) -> None: ...
stream = ... # type: Any
def doRollover(self): ...
def shouldRollover(self, record): ...
@@ -42,8 +42,8 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
extMatch = ... # type: Any
dayOfWeek = ... # type: Any
rolloverAt = ... # type: Any
def __init__(self, filename, when='', interval=1, backupCount=0, encoding=None, delay=0,
utc=False, atTime=None): ...
def __init__(self, filename, when=..., interval=..., backupCount=..., encoding=..., delay=...,
utc=..., atTime=...): ...
def computeRollover(self, currentTime): ...
def shouldRollover(self, record): ...
def getFilesToDelete(self): ...
@@ -51,7 +51,7 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
def doRollover(self): ...
class WatchedFileHandler(logging.FileHandler):
def __init__(self, filename: str, mode: str = ..., encoding: str = None, delay: int = ...) -> None: ...
def __init__(self, filename: str, mode: str = ..., encoding: str = ..., delay: int = ...) -> None: ...
stream = ... # type: Any
def emit(self, record): ...
@@ -66,7 +66,7 @@ class SocketHandler(logging.Handler):
retryMax = ... # type: Any
retryFactor = ... # type: Any
def __init__(self, host, port) -> None: ...
def makeSocket(self, timeout=1): ...
def makeSocket(self, timeout=...): ...
retryPeriod = ... # type: Any
def createSocket(self): ...
def send(self, s): ...
@@ -78,7 +78,7 @@ class SocketHandler(logging.Handler):
class DatagramHandler(SocketHandler):
closeOnError = ... # type: Any
def __init__(self, host, port) -> None: ...
def makeSocket(self, timeout=1): ... # TODO: Actually does not have the timeout argument.
def makeSocket(self, timeout=...): ... # TODO: Actually does not have the timeout argument.
def send(self, s): ...
class SysLogHandler(logging.Handler):
@@ -119,7 +119,7 @@ class SysLogHandler(logging.Handler):
unixsocket = ... # type: Any
socket = ... # type: Any
formatter = ... # type: Any
def __init__(self, address=..., facility=..., socktype=None) -> None: ...
def __init__(self, address=..., facility=..., socktype=...) -> None: ...
def encodePriority(self, facility, priority): ...
def close(self): ...
def mapPriority(self, levelName): ...
@@ -134,8 +134,8 @@ class SMTPHandler(logging.Handler):
subject = ... # type: Any
secure = ... # type: Any
timeout = ... # type: Any
def __init__(self, mailhost, fromaddr, toaddrs, subject, credentials=None, secure=None,
timeout=0.0): ...
def __init__(self, mailhost, fromaddr, toaddrs, subject, credentials=..., secure=...,
timeout=...): ...
def getSubject(self, record): ...
def emit(self, record): ...
@@ -145,7 +145,7 @@ class NTEventLogHandler(logging.Handler):
logtype = ... # type: Any
deftype = ... # type: Any
typemap = ... # type: Any
def __init__(self, appname, dllname=None, logtype='') -> None: ...
def __init__(self, appname, dllname=..., logtype=...) -> None: ...
def getMessageID(self, record): ...
def getEventCategory(self, record): ...
def getEventType(self, record): ...
@@ -158,7 +158,7 @@ class HTTPHandler(logging.Handler):
method = ... # type: Any
secure = ... # type: Any
credentials = ... # type: Any
def __init__(self, host, url, method='', secure=False, credentials=None) -> None: ...
def __init__(self, host, url, method=..., secure=..., credentials=...) -> None: ...
def mapLogRecord(self, record): ...
def emit(self, record): ...
@@ -174,7 +174,7 @@ class BufferingHandler(logging.Handler):
class MemoryHandler(BufferingHandler):
flushLevel = ... # type: Any
target = ... # type: Any
def __init__(self, capacity, flushLevel=..., target=None) -> None: ...
def __init__(self, capacity, flushLevel=..., target=...) -> None: ...
def shouldFlush(self, record): ...
def setTarget(self, target): ...
buffer = ... # type: Any

View File

@@ -6,6 +6,6 @@ class md5(object):
def hexdigest(self) -> str: ...
def copy(self) -> md5: ...
def new(string: str = None) -> md5: ...
def new(string: str = ...) -> md5: ...
blocksize = 0
digest_size = 0

View File

@@ -58,7 +58,7 @@ class Rational(Real):
class Integral(Rational):
def __long__(self): ...
def __index__(self): ...
def __pow__(self, exponent, modulus=None): ...
def __pow__(self, exponent, modulus=...): ...
def __lshift__(self, other): ...
def __rlshift__(self, other): ...
def __rshift__(self, other): ...

View File

@@ -24,7 +24,7 @@ def getppid() -> int: ...
def getresuid() -> Tuple[int, int, int]: ...
def getresgid() -> Tuple[int, int, int]: ...
def getuid() -> int: ...
def getenv(varname: str, value: str = None) -> str: ...
def getenv(varname: str, value: str = ...) -> str: ...
def putenv(varname: str, value: str) -> None: ...
def setegid(egid: int) -> None: ...
def seteuid(euid: int) -> None: ...
@@ -81,7 +81,7 @@ SEEK_CUR = 1
SEEK_END = 2
# TODO(prvak): maybe file should be unicode? (same with all other paths...)
def open(file: unicode, flags: int, mode: int = 0777) -> int: ...
def open(file: unicode, flags: int, mode: int = ...) -> int: ...
def openpty() -> Tuple[int, int]: ...
def pipe() -> Tuple[int, int]: ...
def read(fd: int, n: int) -> str: ...
@@ -112,13 +112,13 @@ def listdir(path: AnyStr) -> List[AnyStr]: ...
# TODO(MichalPokorny)
def lstat(path: unicode) -> Any: ...
def mkfifo(path: unicode, mode: int = 0666) -> None: ...
def mknod(filename: unicode, mode: int = 0600, device: int = 0) -> None: ...
def mkfifo(path: unicode, mode: int = ...) -> None: ...
def mknod(filename: unicode, mode: int = ..., device: int = ...) -> None: ...
def major(device: int) -> int: ...
def minor(device: int) -> int: ...
def makedev(major: int, minor: int) -> int: ...
def mkdir(path: unicode, mode: int = 0777) -> None: ...
def makedirs(path: unicode, mode: int = 0777) -> None: ...
def mkdir(path: unicode, mode: int = ...) -> None: ...
def makedirs(path: unicode, mode: int = ...) -> None: ...
def pathconf(path: unicode, name: str) -> str: ...
pathconf_names = ... # type: Mapping[str, int]

View File

@@ -47,7 +47,7 @@ def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ...
def normcase(path: AnyStr) -> AnyStr: ...
def normpath(path: AnyStr) -> AnyStr: ...
def realpath(path: AnyStr) -> AnyStr: ...
def relpath(path: AnyStr, start: AnyStr = None) -> AnyStr: ...
def relpath(path: AnyStr, start: AnyStr = ...) -> AnyStr: ...
def samefile(path1: unicode, path2: unicode) -> bool: ...
def sameopenfile(fp1: int, fp2: int) -> bool: ...

View File

@@ -2,7 +2,7 @@
from typing import Any, IO
def dump(obj: Any, file: IO[str], protocol: int = None) -> None: ...
def dumps(obj: Any, protocol: int = None) -> str: ...
def dump(obj: Any, file: IO[str], protocol: int = ...) -> None: ...
def dumps(obj: Any, protocol: int = ...) -> str: ...
def load(file: IO[str]) -> Any: ...
def loads(str: str) -> Any: ...

View File

@@ -4,16 +4,16 @@
from typing import IO, Any
def pprint(object: Any, stream: IO[Any] = None, indent: int = 1, width: int = 80,
depth: int = None) -> None: ...
def pformat(object, indent=1, width=80, depth=None): ...
def pprint(object: Any, stream: IO[Any] = ..., indent: int = ..., width: int = ...,
depth: int = ...) -> None: ...
def pformat(object, indent=..., width=..., depth=...): ...
def saferepr(object): ...
def isreadable(object): ...
def isrecursive(object): ...
class PrettyPrinter:
def __init__(self, indent: int = 1, width: int = 80, depth: int = None,
stream: IO[Any] = None) -> None: ...
def __init__(self, indent: int = ..., width: int = ..., depth: int = ...,
stream: IO[Any] = ...) -> None: ...
def pprint(self, object): ...
def pformat(self, object): ...
def isrecursive(self, object): ...

View File

@@ -15,8 +15,8 @@ from typing import (
_T = TypeVar('_T')
class Random(_random.Random):
def __init__(self, x: object = None) -> None: ...
def seed(self, x: object = None) -> None: ...
def __init__(self, x: object = ...) -> None: ...
def seed(self, x: object = ...) -> None: ...
def getstate(self) -> _random._State: ...
def setstate(self, state: _random._State) -> None: ...
def jumpahead(self, n : int) -> None: ...
@@ -24,15 +24,15 @@ class Random(_random.Random):
@overload
def randrange(self, stop: int) -> int: ...
@overload
def randrange(self, start: int, stop: int, step: int = 1) -> int: ...
def randrange(self, start: int, stop: int, step: int = ...) -> int: ...
def randint(self, a: int, b: int) -> int: ...
def choice(self, seq: Sequence[_T]) -> _T: ...
def shuffle(self, x: List[Any], random: Callable[[], None] = None) -> None: ...
def shuffle(self, x: List[Any], random: Callable[[], None] = ...) -> None: ...
def sample(self, population: Union[Sequence[_T], AbstractSet[_T]], k: int) -> List[_T]: ...
def random(self) -> float: ...
def uniform(self, a: float, b: float) -> float: ...
def triangular(self, low: float = 0.0, high: float = 1.0,
mode: float = None) -> float: ...
def triangular(self, low: float = ..., high: float = ...,
mode: float = ...) -> float: ...
def betavariate(self, alpha: float, beta: float) -> float: ...
def expovariate(self, lambd: float) -> float: ...
def gammavariate(self, alpha: float, beta: float) -> float: ...
@@ -45,13 +45,13 @@ class Random(_random.Random):
# SystemRandom is not implemented for all OS's; good on Windows & Linux
class SystemRandom:
def __init__(self, randseed: object = None) -> None: ...
def __init__(self, randseed: object = ...) -> None: ...
def random(self) -> float: ...
def getrandbits(self, k: int) -> int: ...
def seed(self, x: object = None) -> None: ...
def seed(self, x: object = ...) -> None: ...
# ----- random function stubs -----
def seed(x: object = None) -> None: ...
def seed(x: object = ...) -> None: ...
def getstate() -> object: ...
def setstate(state: object) -> None: ...
def jumpahead(n : int) -> None: ...
@@ -59,15 +59,15 @@ def getrandbits(k: int) -> int: ...
@overload
def randrange(stop: int) -> int: ...
@overload
def randrange(start: int, stop: int, step: int = 1) -> int: ...
def randrange(start: int, stop: int, step: int = ...) -> int: ...
def randint(a: int, b: int) -> int: ...
def choice(seq: Sequence[_T]) -> _T: ...
def shuffle(x: List[Any], random: Callable[[], float] = None) -> None: ...
def shuffle(x: List[Any], random: Callable[[], float] = ...) -> None: ...
def sample(population: Union[Sequence[_T], AbstractSet[_T]], k: int) -> List[_T]: ...
def random() -> float: ...
def uniform(a: float, b: float) -> float: ...
def triangular(low: float = 0.0, high: float = 1.0,
mode: float = None) -> float: ...
def triangular(low: float = ..., high: float = ...,
mode: float = ...) -> float: ...
def betavariate(alpha: float, beta: float) -> float: ...
def expovariate(lambd: float) -> float: ...
def gammavariate(alpha: float, beta: float) -> float: ...

View File

@@ -26,37 +26,37 @@ VERBOSE = 0
class error(Exception): ...
def compile(pattern: AnyStr, flags: int = 0) -> Pattern[AnyStr]: ...
def compile(pattern: AnyStr, flags: int = ...) -> Pattern[AnyStr]: ...
def search(pattern: AnyStr, string: AnyStr,
flags: int = 0) -> Match[AnyStr]: ...
flags: int = ...) -> Match[AnyStr]: ...
def match(pattern: AnyStr, string: AnyStr,
flags: int = 0) -> Match[AnyStr]: ...
def split(pattern: AnyStr, string: AnyStr, maxsplit: int = 0,
flags: int = 0) -> List[AnyStr]: ...
flags: int = ...) -> Match[AnyStr]: ...
def split(pattern: AnyStr, string: AnyStr, maxsplit: int = ...,
flags: int = ...) -> List[AnyStr]: ...
def findall(pattern: AnyStr, string: AnyStr,
flags: int = 0) -> List[AnyStr]: ...
flags: int = ...) -> List[AnyStr]: ...
# Return an iterator yielding match objects over all non-overlapping matches
# for the RE pattern in string. The string is scanned left-to-right, and
# matches are returned in the order found. Empty matches are included in the
# result unless they touch the beginning of another match.
def finditer(pattern: AnyStr, string: AnyStr,
flags: int = 0) -> Iterator[Match[AnyStr]]: ...
flags: int = ...) -> Iterator[Match[AnyStr]]: ...
@overload
def sub(pattern: AnyStr, repl: AnyStr, string: AnyStr, count: int = 0,
flags: int = 0) -> AnyStr: ...
def sub(pattern: AnyStr, repl: AnyStr, string: AnyStr, count: int = ...,
flags: int = ...) -> AnyStr: ...
@overload
def sub(pattern: AnyStr, repl: Callable[[Match[AnyStr]], AnyStr],
string: AnyStr, count: int = 0, flags: int = 0) -> AnyStr: ...
string: AnyStr, count: int = ..., flags: int = ...) -> AnyStr: ...
@overload
def subn(pattern: AnyStr, repl: AnyStr, string: AnyStr, count: int = 0,
flags: int = 0) -> Tuple[AnyStr, int]: ...
def subn(pattern: AnyStr, repl: AnyStr, string: AnyStr, count: int = ...,
flags: int = ...) -> Tuple[AnyStr, int]: ...
@overload
def subn(pattern: AnyStr, repl: Callable[[Match[AnyStr]], AnyStr],
string: AnyStr, count: int = 0,
flags: int = 0) -> Tuple[AnyStr, int]: ...
string: AnyStr, count: int = ...,
flags: int = ...) -> Tuple[AnyStr, int]: ...
def escape(string: AnyStr) -> AnyStr: ...

View File

@@ -6,7 +6,7 @@ class sha(object):
def hexdigest(self) -> str: ...
def copy(self) -> sha: ...
def new(string: str = None) -> sha: ...
def new(string: str = ...) -> sha: ...
blocksize = 0
digest_size = 0

View File

@@ -1,16 +1,16 @@
from typing import Optional, List, Any, IO
def split(s: Optional[str], comments: bool = False, posix: bool = True) -> List[str]: ...
def split(s: Optional[str], comments: bool = ..., posix: bool = ...) -> List[str]: ...
class shlex:
def __init__(self, instream: IO[Any] = None, infile: IO[Any] = None, posix: bool = True) -> None: ...
def __init__(self, instream: IO[Any] = ..., infile: IO[Any] = ..., posix: bool = ...) -> None: ...
def get_token(self) -> Optional[str]: ...
def push_token(self, _str: str) -> None: ...
def read_token(self) -> str: ...
def sourcehook(self, filename: str) -> None: ...
def push_source(self, stream: IO[Any], filename: str = None) -> None: ...
def push_source(self, stream: IO[Any], filename: str = ...) -> None: ...
def pop_source(self) -> IO[Any]: ...
def error_leader(file: str = None, line: int = None) -> str: ...
def error_leader(file: str = ..., line: int = ...) -> str: ...
commenters = ... # type: str
wordchars = ... # type: str

View File

@@ -15,16 +15,16 @@ def copystat(src: unicode, dst: unicode) -> None: ...
def copy(src: unicode, dst: unicode) -> None: ...
def copy2(src: unicode, dst: unicode) -> None: ...
def ignore_patterns(*patterns: AnyStr) -> Callable[[AnyStr, List[AnyStr]], Iterable[AnyStr]]: ...
def copytree(src: AnyStr, dst: AnyStr, symlinks: bool = False,
ignore: Callable[[AnyStr, List[AnyStr]], Iterable[AnyStr]] = None) -> None: ...
def rmtree(path: AnyStr, ignore_errors: bool = False,
onerror: Callable[[Any, AnyStr, Any], None] = None) -> None: ...
def copytree(src: AnyStr, dst: AnyStr, symlinks: bool = ...,
ignore: Callable[[AnyStr, List[AnyStr]], Iterable[AnyStr]] = ...) -> None: ...
def rmtree(path: AnyStr, ignore_errors: bool = ...,
onerror: Callable[[Any, AnyStr, Any], None] = ...) -> None: ...
def move(src: unicode, dst: unicode) -> None: ...
def get_archive_formats() -> List[Tuple[str, str]]: ...
def register_archive_format(name: str, function: Callable[..., Any],
extra_args: Sequence[Tuple[str, Any]] = None,
description: str = '') -> None: ...
extra_args: Sequence[Tuple[str, Any]] = ...,
description: str = ...) -> None: ...
def unregister_archive_format(name: str) -> None: ...
def make_archive(base_name: AnyStr, format: str, root_dir: unicode = None,
base_dir: unicode = None, verbose: int = 0, dry_run: int = 0,
owner: str = None, group: str = None, logger: Any = None) -> AnyStr: ...
def make_archive(base_name: AnyStr, format: str, root_dir: unicode = ...,
base_dir: unicode = ..., verbose: int = ..., dry_run: int = ...,
owner: str = ..., group: str = ..., logger: Any = ...) -> AnyStr: ...

View File

@@ -36,7 +36,7 @@ def quotedata(data): ...
class SSLFakeFile:
sslobj = ... # type: Any
def __init__(self, sslobj) -> None: ...
def readline(self, size=-1): ...
def readline(self, size=...): ...
def close(self): ...
class SMTP:
@@ -50,18 +50,18 @@ class SMTP:
timeout = ... # type: Any
esmtp_features = ... # type: Any
local_hostname = ... # type: Any
def __init__(self, host: str = '', port: int = 0, local_hostname=None, timeout=...) -> None: ...
def __init__(self, host: str = ..., port: int = ..., local_hostname=..., timeout=...) -> None: ...
def set_debuglevel(self, debuglevel): ...
sock = ... # type: Any
def connect(self, host='', port=0): ...
def connect(self, host=..., port=...): ...
def send(self, str): ...
def putcmd(self, cmd, args=''): ...
def putcmd(self, cmd, args=...): ...
def getreply(self): ...
def docmd(self, cmd, args=''): ...
def helo(self, name=''): ...
def ehlo(self, name=''): ...
def docmd(self, cmd, args=...): ...
def helo(self, name=...): ...
def ehlo(self, name=...): ...
def has_extn(self, opt): ...
def help(self, args=''): ...
def help(self, args=...): ...
def rset(self): ...
def noop(self): ...
def mail(self, sender, options=...): ...
@@ -72,7 +72,7 @@ class SMTP:
def expn(self, address): ...
def ehlo_or_helo_if_needed(self): ...
def login(self, user, password): ...
def starttls(self, keyfile=None, certfile=None): ...
def starttls(self, keyfile=..., certfile=...): ...
def sendmail(self, from_addr, to_addrs, msg, mail_options=..., rcpt_options=...): ...
def close(self): ...
def quit(self): ...
@@ -81,10 +81,10 @@ class SMTP_SSL(SMTP):
default_port = ... # type: Any
keyfile = ... # type: Any
certfile = ... # type: Any
def __init__(self, host='', port=0, local_hostname=None, keyfile=None, certfile=None, timeout=...) -> None: ...
def __init__(self, host=..., port=..., local_hostname=..., keyfile=..., certfile=..., timeout=...) -> None: ...
class LMTP(SMTP):
ehlo_msg = ... # type: Any
def __init__(self, host='', port=..., local_hostname=None) -> None: ...
def __init__(self, host=..., port=..., local_hostname=...) -> None: ...
sock = ... # type: Any
def connect(self, host='', port=0): ...
def connect(self, host=..., port=...): ...

View File

@@ -277,8 +277,8 @@ class socket:
type = 0
proto = 0
def __init__(self, family: int = AF_INET, type: int = SOCK_STREAM,
proto: int = 0, fileno: int = None) -> None: ...
def __init__(self, family: int = ..., type: int = ...,
proto: int = ..., fileno: int = ...) -> None: ...
# --- methods ---
# second tuple item is an address
@@ -318,26 +318,26 @@ class socket:
option: Tuple[int, int, int]) -> None: ...
def listen(self, backlog: int) -> None: ...
# TODO the return value may be BinaryIO or TextIO, depending on mode
def makefile(self, mode: str = 'r', buffering: int = None,
encoding: str = None, errors: str = None,
newline: str = None) -> Any:
def makefile(self, mode: str = ..., buffering: int = ...,
encoding: str = ..., errors: str = ...,
newline: str = ...) -> Any:
...
def recv(self, bufsize: int, flags: int = 0) -> str: ...
def recv(self, bufsize: int, flags: int = ...) -> str: ...
# return type is an address
def recvfrom(self, bufsize: int, flags: int = 0) -> Any: ...
def recvfrom(self, bufsize: int, flags: int = ...) -> Any: ...
def recvfrom_into(self, buffer: str, nbytes: int,
flags: int = 0) -> Any: ...
flags: int = ...) -> Any: ...
def recv_into(self, buffer: str, nbytes: int,
flags: int = 0) -> Any: ...
def send(self, data: str, flags=0) -> int: ...
def sendall(self, data: str, flags=0) -> Any:
flags: int = ...) -> Any: ...
def send(self, data: str, flags=...) -> int: ...
def sendall(self, data: str, flags=...) -> Any:
... # return type: None on success
@overload
def sendto(self, data: str, address: tuple, flags: int = 0) -> int: ...
def sendto(self, data: str, address: tuple, flags: int = ...) -> int: ...
@overload
def sendto(self, data: str, address: str, flags: int = 0) -> int: ...
def sendto(self, data: str, address: str, flags: int = ...) -> int: ...
def setblocking(self, flag: bool) -> None: ...
# TODO None valid for the value argument
@@ -353,28 +353,28 @@ class socket:
# ----- functions -----
def create_connection(address: Tuple[str, int],
timeout: float = _GLOBAL_DEFAULT_TIMEOUT,
source_address: Tuple[str, int] = None) -> socket: ...
timeout: float = ...,
source_address: Tuple[str, int] = ...) -> socket: ...
# the 5th tuple item is an address
def getaddrinfo(
host: Optional[str], port: Union[str, int, None], family: int = 0,
socktype: int = 0, proto: int = 0, flags: int = 0) -> List[Tuple[int, int, int, str, Union[Tuple[str, int], Tuple[str, int, int, int]]]]:
host: Optional[str], port: Union[str, int, None], family: int = ...,
socktype: int = ..., proto: int = ..., flags: int = ...) -> List[Tuple[int, int, int, str, Union[Tuple[str, int], Tuple[str, int, int, int]]]]:
...
def getfqdn(name: str = '') -> str: ...
def getfqdn(name: str = ...) -> str: ...
def gethostbyname(hostname: str) -> str: ...
def gethostbyname_ex(hostname: str) -> Tuple[str, List[str], List[str]]: ...
def gethostname() -> str: ...
def gethostbyaddr(ip_address: str) -> Tuple[str, List[str], List[str]]: ...
def getnameinfo(sockaddr: tuple, flags: int) -> Tuple[str, int]: ...
def getprotobyname(protocolname: str) -> int: ...
def getservbyname(servicename: str, protocolname: str = None) -> int: ...
def getservbyport(port: int, protocolname: str = None) -> str: ...
def socketpair(family: int = AF_INET,
type: int = SOCK_STREAM,
proto: int = 0) -> Tuple[socket, socket]: ...
def fromfd(fd: int, family: int, type: int, proto: int = 0) -> socket: ...
def getservbyname(servicename: str, protocolname: str = ...) -> int: ...
def getservbyport(port: int, protocolname: str = ...) -> str: ...
def socketpair(family: int = ...,
type: int = ...,
proto: int = ...) -> Tuple[socket, socket]: ...
def fromfd(fd: int, family: int, type: int, proto: int = ...) -> socket: ...
def ntohl(x: int) -> int: ... # param & ret val are 32-bit ints
def ntohs(x: int) -> int: ... # param & ret val are 16-bit ints
def htonl(x: int) -> int: ... # param & ret val are 32-bit ints

View File

@@ -17,35 +17,35 @@ printable = ... # type: str
uppercase = ... # type: str
whitespace = ... # type: str
def capwords(s: AnyStr, sep: AnyStr = None) -> AnyStr: ...
def capwords(s: AnyStr, sep: AnyStr = ...) -> AnyStr: ...
# TODO: originally named 'from'
def maketrans(_from: str, to: str) -> str: ...
def atof(s: unicode) -> float: ...
def atoi(s: unicode, base: int = 10) -> int: ...
def atol(s: unicode, base: int = 10) -> int: ...
def atoi(s: unicode, base: int = ...) -> int: ...
def atol(s: unicode, base: int = ...) -> int: ...
def capitalize(word: AnyStr) -> AnyStr: ...
def find(s: unicode, sub: unicode, start: int = None, end: int = None) -> int: ...
def rfind(s: unicode, sub: unicode, start: int = None, end: int = None) -> int: ...
def index(s: unicode, sub: unicode, start: int = None, end: int = None) -> int: ...
def rindex(s: unicode, sub: unicode, start: int = None, end: int = None) -> int: ...
def count(s: unicode, sub: unicode, start: int = None, end: int = None) -> int: ...
def find(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ...
def rfind(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ...
def index(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ...
def rindex(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ...
def count(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ...
def lower(s: AnyStr) -> AnyStr: ...
def split(s: AnyStr, sep: AnyStr = None, maxsplit: int = -1) -> List[AnyStr]: ...
def rsplit(s: AnyStr, sep: AnyStr = None, maxsplit: int = -1) -> List[AnyStr]: ...
def splitfields(s: AnyStr, sep: AnyStr = None, maxsplit: int = -1) -> List[AnyStr]: ...
def join(words: Iterable[AnyStr], sep: AnyStr = None) -> AnyStr: ...
def joinfields(word: Iterable[AnyStr], sep: AnyStr = None) -> AnyStr: ...
def lstrip(s: AnyStr, chars: AnyStr = None) -> AnyStr: ...
def rstrip(s: AnyStr, chars: AnyStr = None) -> AnyStr: ...
def strip(s: AnyStr, chars: AnyStr = None) -> AnyStr: ...
def split(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> List[AnyStr]: ...
def rsplit(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> List[AnyStr]: ...
def splitfields(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> List[AnyStr]: ...
def join(words: Iterable[AnyStr], sep: AnyStr = ...) -> AnyStr: ...
def joinfields(word: Iterable[AnyStr], sep: AnyStr = ...) -> AnyStr: ...
def lstrip(s: AnyStr, chars: AnyStr = ...) -> AnyStr: ...
def rstrip(s: AnyStr, chars: AnyStr = ...) -> AnyStr: ...
def strip(s: AnyStr, chars: AnyStr = ...) -> AnyStr: ...
def swapcase(s: AnyStr) -> AnyStr: ...
def translate(s: str, table: str, deletechars: str = None) -> str: ...
def translate(s: str, table: str, deletechars: str = ...) -> str: ...
def upper(s: AnyStr) -> AnyStr: ...
def ljust(s: AnyStr, width: int, fillhar: AnyStr = ' ') -> AnyStr: ...
def rjust(s: AnyStr, width: int, fillhar: AnyStr = ' ') -> AnyStr: ...
def center(s: AnyStr, width: int, fillhar: AnyStr = ' ') -> AnyStr: ...
def ljust(s: AnyStr, width: int, fillhar: AnyStr = ...) -> AnyStr: ...
def rjust(s: AnyStr, width: int, fillhar: AnyStr = ...) -> AnyStr: ...
def center(s: AnyStr, width: int, fillhar: AnyStr = ...) -> AnyStr: ...
def zfill(s: AnyStr, width: int) -> AnyStr: ...
def replace(s: AnyStr, old: AnyStr, new: AnyStr, maxreplace: int = None) -> AnyStr: ...
def replace(s: AnyStr, old: AnyStr, new: AnyStr, maxreplace: int = ...) -> AnyStr: ...
class Template(object):
# TODO: Unicode support?

View File

@@ -9,17 +9,17 @@ _FILE = Union[int, IO[Any]]
# TODO force keyword arguments
# TODO more keyword arguments (from Popen)
def call(args: Sequence[str], *,
stdin: _FILE = None, stdout: _FILE = None, stderr: _FILE = None,
shell: bool = False, env: Mapping[str, str] = None,
cwd: str = None) -> int: ...
stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ...,
shell: bool = ..., env: Mapping[str, str] = ...,
cwd: str = ...) -> int: ...
def check_call(args: Sequence[str], *,
stdin: _FILE = None, stdout: _FILE = None, stderr: _FILE = None,
shell: bool = False, env: Mapping[str, str] = None, cwd: str = None,
close_fds: Sequence[_FILE] = None, preexec_fn: Callable[[], Any] = None) -> int: ...
stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ...,
shell: bool = ..., env: Mapping[str, str] = ..., cwd: str = ...,
close_fds: Sequence[_FILE] = ..., preexec_fn: Callable[[], Any] = ...) -> int: ...
def check_output(args: Sequence[str], *,
stdin: _FILE = None, stderr: _FILE = None,
shell: bool = False, universal_newlines: bool = False,
env: Mapping[str, str] = None, cwd: str = None) -> str: ...
stdin: _FILE = ..., stderr: _FILE = ...,
shell: bool = ..., universal_newlines: bool = ...,
env: Mapping[str, str] = ..., cwd: str = ...) -> str: ...
PIPE = ... # type: int
STDOUT = ... # type: int
@@ -40,24 +40,24 @@ class Popen:
def __init__(self,
args: Sequence[str],
bufsize: int = 0,
executable: str = None,
stdin: _FILE = None,
stdout: _FILE = None,
stderr: _FILE = None,
preexec_fn: Callable[[], Any] = None,
close_fds: bool = False,
shell: bool = False,
cwd: str = None,
env: Mapping[str, str] = None,
universal_newlines: bool = False,
startupinfo: Any = None,
creationflags: int = 0) -> None: ...
bufsize: int = ...,
executable: str = ...,
stdin: _FILE = ...,
stdout: _FILE = ...,
stderr: _FILE = ...,
preexec_fn: Callable[[], Any] = ...,
close_fds: bool = ...,
shell: bool = ...,
cwd: str = ...,
env: Mapping[str, str] = ...,
universal_newlines: bool = ...,
startupinfo: Any = ...,
creationflags: int = ...) -> None: ...
def poll(self) -> int: ...
def wait(self) -> int: ...
# Return str/bytes
def communicate(self, input: str = None) -> Tuple[str, str]: ...
def communicate(self, input: str = ...) -> Tuple[str, str]: ...
def send_signal(self, signal: int) -> None: ...
def terminatate(self) -> None: ...
def kill(self) -> None: ...

View File

@@ -41,8 +41,8 @@ class _Stream:
def write(self, s): ...
def close(self): ...
def tell(self): ...
def seek(self, pos=0): ...
def read(self, size=None): ...
def seek(self, pos=...): ...
def read(self, size=...): ...
class _StreamProxy:
fileobj = ... # type: Any
@@ -74,10 +74,10 @@ class _FileInFile:
size = ... # type: Any
sparse = ... # type: Any
position = ... # type: Any
def __init__(self, fileobj, offset, size, sparse=None) -> None: ...
def __init__(self, fileobj, offset, size, sparse=...) -> None: ...
def tell(self): ...
def seek(self, position): ...
def read(self, size=None): ...
def read(self, size=...): ...
def readnormal(self, size): ...
def readsparse(self, size): ...
def readsparsesection(self, size): ...
@@ -92,8 +92,8 @@ class ExFileObject:
position = ... # type: Any
buffer = ... # type: Any
def __init__(self, tarfile, tarinfo) -> None: ...
def read(self, size=None): ...
def readline(self, size=-1): ...
def read(self, size=...): ...
def readline(self, size=...): ...
def readlines(self): ...
def tell(self): ...
def seek(self, pos, whence=...): ...
@@ -117,11 +117,11 @@ class TarInfo:
offset = ... # type: Any
offset_data = ... # type: Any
pax_headers = ... # type: Any
def __init__(self, name='') -> None: ...
def __init__(self, name=...) -> None: ...
path = ... # type: Any
linkpath = ... # type: Any
def get_info(self, encoding, errors): ...
def tobuf(self, format=..., encoding=..., errors=''): ...
def tobuf(self, format=..., encoding=..., errors=...): ...
def create_ustar_header(self, info): ...
def create_gnu_header(self, info): ...
def create_pax_header(self, info, encoding, errors): ...
@@ -161,27 +161,27 @@ class TarFile:
offset = ... # type: Any
inodes = ... # type: Any
firstmember = ... # type: Any
def __init__(self, name=None, mode='', fileobj=None, format=None, tarinfo=None, dereference=None, ignore_zeros=None, encoding=None, errors=None, pax_headers=None, debug=None, errorlevel=None) -> None: ...
def __init__(self, name=..., mode=..., fileobj=..., format=..., tarinfo=..., dereference=..., ignore_zeros=..., encoding=..., errors=..., pax_headers=..., debug=..., errorlevel=...) -> None: ...
posix = ... # type: Any
@classmethod
def open(cls, name=None, mode='', fileobj=None, bufsize=..., **kwargs): ...
def open(cls, name=..., mode=..., fileobj=..., bufsize=..., **kwargs): ...
@classmethod
def taropen(cls, name, mode='', fileobj=None, **kwargs): ...
def taropen(cls, name, mode=..., fileobj=..., **kwargs): ...
@classmethod
def gzopen(cls, name, mode='', fileobj=None, compresslevel=9, **kwargs): ...
def gzopen(cls, name, mode=..., fileobj=..., compresslevel=..., **kwargs): ...
@classmethod
def bz2open(cls, name, mode='', fileobj=None, compresslevel=9, **kwargs): ...
def bz2open(cls, name, mode=..., fileobj=..., compresslevel=..., **kwargs): ...
OPEN_METH = ... # type: Any
def close(self): ...
def getmember(self, name): ...
def getmembers(self): ...
def getnames(self): ...
def gettarinfo(self, name=None, arcname=None, fileobj=None): ...
def list(self, verbose=True): ...
def add(self, name, arcname=None, recursive=True, exclude=None, filter=None): ...
def addfile(self, tarinfo, fileobj=None): ...
def extractall(self, path='', members=None): ...
def extract(self, member, path=''): ...
def gettarinfo(self, name=..., arcname=..., fileobj=...): ...
def list(self, verbose=...): ...
def add(self, name, arcname=..., recursive=..., exclude=..., filter=...): ...
def addfile(self, tarinfo, fileobj=...): ...
def extractall(self, path=..., members=...): ...
def extract(self, member, path=...): ...
def extractfile(self, member): ...
def makedir(self, tarinfo, targetpath): ...
def makefile(self, tarinfo, targetpath): ...
@@ -223,14 +223,14 @@ class _ringbuffer(list):
class TarFileCompat:
tarfile = ... # type: Any
def __init__(self, file, mode='', compression=...) -> None: ...
def __init__(self, file, mode=..., compression=...) -> None: ...
def namelist(self): ...
def infolist(self): ...
def printdir(self): ...
def testzip(self): ...
def getinfo(self, name): ...
def read(self, name): ...
def write(self, filename, arcname=None, compress_type=None): ...
def write(self, filename, arcname=..., compress_type=...): ...
def writestr(self, zinfo, bytes): ...
def close(self): ...

View File

@@ -14,29 +14,29 @@ template = ... # type: str
# function stubs
def TemporaryFile(
mode: str = 'w+b', bufsize: int = -1, suffix: str = '',
prefix: str = 'tmp', dir: str = None) -> IO[str]: ...
mode: str = ..., bufsize: int = ..., suffix: str = ...,
prefix: str = ..., dir: str = ...) -> IO[str]: ...
def NamedTemporaryFile(
mode: str = 'w+b', bufsize: int = -1, suffix: str = '',
prefix: str = 'tmp', dir: str = None, delete: bool = True
mode: str = ..., bufsize: int = ..., suffix: str = ...,
prefix: str = ..., dir: str = ..., delete: bool = ...
) -> IO[str]: ...
def SpooledTemporaryFile(
max_size: int = 0, mode: str = 'w+b', buffering: int = -1,
suffix: str = '', prefix: str = 'tmp', dir: str = None) -> IO[str]:
max_size: int = ..., mode: str = ..., buffering: int = ...,
suffix: str = ..., prefix: str = ..., dir: str = ...) -> IO[str]:
...
class TemporaryDirectory:
name = ... # type: str
def __init__(self, suffix: str = '', prefix: str = 'tmp',
dir: str = None) -> None: ...
def __init__(self, suffix: str = ..., prefix: str = ...,
dir: str = ...) -> None: ...
def cleanup(self) -> None: ...
def __enter__(self) -> str: ...
def __exit__(self, type, value, traceback) -> bool: ...
def mkstemp(suffix: str = '', prefix: str = 'tmp', dir: str = None,
text: bool = False) -> Tuple[int, str]: ...
def mkdtemp(suffix: str = '', prefix: str = 'tmp',
dir: str = None) -> str: ...
def mktemp(suffix: str = '', prefix: str = 'tmp', dir: str = None) -> str: ...
def mkstemp(suffix: str = ..., prefix: str = ..., dir: str = ...,
text: bool = ...) -> Tuple[int, str]: ...
def mkdtemp(suffix: str = ..., prefix: str = ...,
dir: str = ...) -> str: ...
def mktemp(suffix: str = ..., prefix: str = ..., dir: str = ...) -> str: ...
def gettempdir() -> str: ...
def gettempprefix() -> str: ...

View File

@@ -24,10 +24,10 @@ class TextWrapper:
break_on_hyphens = ... # type: Any
wordsep_re_uni = ... # type: Any
wordsep_simple_re_uni = ... # type: Any
def __init__(self, width=70, initial_indent='', subsequent_indent='', expand_tabs=True, replace_whitespace=True, fix_sentence_endings=False, break_long_words=True, drop_whitespace=True, break_on_hyphens=True) -> None: ...
def __init__(self, width=..., initial_indent=..., subsequent_indent=..., expand_tabs=..., replace_whitespace=..., fix_sentence_endings=..., break_long_words=..., drop_whitespace=..., break_on_hyphens=...) -> None: ...
def wrap(self, text): ...
def fill(self, text): ...
def wrap(text, width=70, **kwargs): ...
def fill(text, width=70, **kwargs): ...
def wrap(text, width=..., **kwargs): ...
def fill(text, width=..., **kwargs): ...
def dedent(text): ...

View File

@@ -14,12 +14,12 @@ class Thread(object):
ident = 0
daemon = False
def __init__(self, group: Any = None, target: Any = None,
name: str = None, args: tuple = (),
kwargs: Dict[Any, Any] = {}) -> None: ...
def __init__(self, group: Any = ..., target: Any = ...,
name: str = ..., args: tuple = ...,
kwargs: Dict[Any, Any] = ...) -> None: ...
def start(self) -> None: ...
def run(self) -> None: ...
def join(self, timeout: float = None) -> None: ...
def join(self, timeout: float = ...) -> None: ...
def is_alive(self) -> bool: ...
# Legacy methods
@@ -31,15 +31,15 @@ class Thread(object):
class Timer(object):
def __init__(self, interval: float, function: Any,
args: List[Any] = [],
kwargs: Mapping[Any, Any] = {}) -> None: ...
args: List[Any] = ...,
kwargs: Mapping[Any, Any] = ...) -> None: ...
def cancel(self) -> None: ...
def start(self) -> None: ...
# TODO: better type
def settrace(func: Callable[[Any, str, Any], Any]) -> None: ...
def setprofile(func: Any) -> None: ...
def stack_size(size: int = 0) -> None: ...
def stack_size(size: int = ...) -> None: ...
class ThreadError(Exception):
pass
@@ -54,45 +54,45 @@ class Event(object):
def set(self) -> None: ...
def clear(self) -> None: ...
# TODO can it return None?
def wait(self, timeout: float = None) -> bool: ...
def wait(self, timeout: float = ...) -> bool: ...
class Lock(object):
def acquire(self, blocking: bool = True) -> bool: ...
def acquire(self, blocking: bool = ...) -> bool: ...
def release(self) -> None: ...
def locked(self) -> bool: ...
def __enter__(self) -> bool: ...
def __exit__(self, *args): ...
class RLock(object):
def acquire(self, blocking: int = 1) -> Optional[bool]: ...
def acquire(self, blocking: int = ...) -> Optional[bool]: ...
def release(self) -> None: ...
def __enter__(self) -> bool: ...
def __exit__(self, *args): ...
class Semaphore(object):
def acquire(self, blocking: bool = True) -> Optional[bool]: ...
def acquire(self, blocking: bool = ...) -> Optional[bool]: ...
def release(self) -> None: ...
def __init__(self, value: int = 1) -> None: ...
def __init__(self, value: int = ...) -> None: ...
def __enter__(self) -> bool: ...
def __exit__(self, *args): ...
class BoundedSemaphore(object):
def acquire(self, blocking: bool = True) -> Optional[bool]: ...
def acquire(self, blocking: bool = ...) -> Optional[bool]: ...
def release(self) -> None: ...
def __init__(self, value: int = 1) -> None: ...
def __init__(self, value: int = ...) -> None: ...
def __enter__(self) -> bool: ...
def __exit__(self, *args): ...
_T = TypeVar('_T')
class Condition(object):
def acquire(self, blocking: bool = True) -> bool: ...
def acquire(self, blocking: bool = ...) -> bool: ...
def release(self) -> None: ...
def notify(self, n: int = 1) -> None: ...
def notify(self, n: int = ...) -> None: ...
def notify_all(self) -> None: ...
def notifyAll(self) -> None: ...
def wait(self, timeout: float = None) -> bool: ...
def wait_for(self, predicate: Callable[[], _T], timeout: float = None) -> Union[_T, bool]: ...
def wait(self, timeout: float = ...) -> bool: ...
def wait_for(self, predicate: Callable[[], _T], timeout: float = ...) -> Union[_T, bool]: ...
def __enter__(self) -> bool: ...
def __exit__(self, *args): ...
def __init__(self, lock: Lock = None) -> None: ...
def __init__(self, lock: Lock = ...) -> None: ...

View File

@@ -1,16 +1,16 @@
from typing import Any, IO, AnyStr, Callable, Tuple, List
from types import TracebackType, FrameType
def print_tb(traceback: TracebackType, limit: int = None, file: IO[str] = None) -> None: ...
def print_exception(type: type, value: Exception, limit: int = None, file: IO[str] = None) -> None: ...
def print_exc(limit: int = None, file: IO[str] = None) -> None: ...
def format_exc(limit: int = None) -> None: ...
def print_last(limit: int = None, file: IO[str] = None) -> None: ...
def print_stack(f: FrameType, limit: int = None, file: IO[AnyStr] = None) -> None: ...
def extract_tb(f: TracebackType, limit: int = None) -> List[Tuple[str, int, str, str]]: ...
def extract_stack(f: FrameType = None, limit: int = None) -> None: ...
def print_tb(traceback: TracebackType, limit: int = ..., file: IO[str] = ...) -> None: ...
def print_exception(type: type, value: Exception, limit: int = ..., file: IO[str] = ...) -> None: ...
def print_exc(limit: int = ..., file: IO[str] = ...) -> None: ...
def format_exc(limit: int = ...) -> None: ...
def print_last(limit: int = ..., file: IO[str] = ...) -> None: ...
def print_stack(f: FrameType, limit: int = ..., file: IO[AnyStr] = ...) -> None: ...
def extract_tb(f: TracebackType, limit: int = ...) -> List[Tuple[str, int, str, str]]: ...
def extract_stack(f: FrameType = ..., limit: int = ...) -> None: ...
def format_list(list: List[Tuple[str, int, str, str]]) -> str: ...
def format_exception_only(type: type, value: List[str]) -> str: ...
def format_tb(f: TracebackType, limit: int = None) -> str: ...
def format_stack(f: FrameType = None, limit: int = None) -> str: ...
def format_tb(f: TracebackType, limit: int = ...) -> str: ...
def format_stack(f: FrameType = ..., limit: int = ...) -> str: ...
def tb_lineno(tb: TracebackType) -> AnyStr: ...

View File

@@ -132,7 +132,7 @@ class DictProxyType:
# TODO is it possible to have non-string keys?
# no __init__
def copy(self) -> dict: ...
def get(self, key: str, default: _T = None) -> Union[Any, _T]: ...
def get(self, key: str, default: _T = ...) -> Union[Any, _T]: ...
def has_key(self, key: str) -> bool: ...
def items(self) -> List[Tuple[str, Any]]: ...
def iteritems(self) -> Iterator[Tuple[str, Any]]: ...
@@ -150,13 +150,13 @@ class NotImplementedType: ...
class GetSetDescriptorType:
__name__ = ... # type: str
__objclass__ = ... # type: type
def __get__(self, obj: Any, type: type = None) -> Any: ...
def __get__(self, obj: Any, type: type = ...) -> Any: ...
def __set__(self, obj: Any) -> None: ...
def __delete__(self, obj: Any) -> None: ...
# Same type on Jython, different on CPython and PyPy, unknown on IronPython.
class MemberDescriptorType:
__name__ = ... # type: str
__objclass__ = ... # type: type
def __get__(self, obj: Any, type: type = None) -> Any: ...
def __get__(self, obj: Any, type: type = ...) -> Any: ...
def __set__(self, obj: Any) -> None: ...
def __delete__(self, obj: Any) -> None: ...

View File

@@ -60,7 +60,7 @@ class SupportsAbs(Generic[_T]):
class SupportsRound(Generic[_T]):
@abstractmethod
def __round__(self, ndigits: int = 0) -> _T: ...
def __round__(self, ndigits: int = ...) -> _T: ...
class Reversible(Generic[_T]):
@abstractmethod
@@ -107,7 +107,7 @@ class MutableSequence(Sequence[_T], Generic[_T]):
def append(self, object: _T) -> None: ...
def extend(self, iterable: Iterable[_T]) -> None: ...
def reverse(self) -> None: ...
def pop(self, index: int = -1) -> _T: ...
def pop(self, index: int = ...) -> _T: ...
def remove(self, object: _T) -> None: ...
def __iadd__(self, x: Iterable[_T]) -> MutableSequence[_T]: ...
@@ -186,15 +186,15 @@ class IO(Iterable[AnyStr], Generic[AnyStr]):
def isatty(self) -> bool: ...
# TODO what if n is None?
@abstractmethod
def read(self, n: int = -1) -> AnyStr: ...
def read(self, n: int = ...) -> AnyStr: ...
@abstractmethod
def readable(self) -> bool: ...
@abstractmethod
def readline(self, limit: int = -1) -> AnyStr: ...
def readline(self, limit: int = ...) -> AnyStr: ...
@abstractmethod
def readlines(self, hint: int = -1) -> list[AnyStr]: ...
def readlines(self, hint: int = ...) -> list[AnyStr]: ...
@abstractmethod
def seek(self, offset: int, whence: int = 0) -> None: ...
def seek(self, offset: int, whence: int = ...) -> None: ...
@abstractmethod
def seekable(self) -> bool: ...
@abstractmethod
@@ -252,7 +252,7 @@ class Match(Generic[AnyStr]):
def expand(self, template: AnyStr) -> AnyStr: ...
@overload
def group(self, group1: int = 0) -> AnyStr: ...
def group(self, group1: int = ...) -> AnyStr: ...
@overload
def group(self, group1: str) -> AnyStr: ...
@overload
@@ -262,11 +262,11 @@ class Match(Generic[AnyStr]):
def group(self, group1: str, group2: str,
*groups: str) -> Sequence[AnyStr]: ...
def groups(self, default: AnyStr = None) -> Sequence[AnyStr]: ...
def groupdict(self, default: AnyStr = None) -> dict[str, AnyStr]: ...
def start(self, group: int = 0) -> int: ...
def end(self, group: int = 0) -> int: ...
def span(self, group: int = 0) -> Tuple[int, int]: ...
def groups(self, default: AnyStr = ...) -> Sequence[AnyStr]: ...
def groupdict(self, default: AnyStr = ...) -> dict[str, AnyStr]: ...
def start(self, group: int = ...) -> int: ...
def end(self, group: int = ...) -> int: ...
def span(self, group: int = ...) -> Tuple[int, int]: ...
class Pattern(Generic[AnyStr]):
flags = 0
@@ -274,26 +274,26 @@ class Pattern(Generic[AnyStr]):
groups = 0
pattern = None # type: AnyStr
def search(self, string: AnyStr, pos: int = 0,
endpos: int = -1) -> Match[AnyStr]: ...
def match(self, string: AnyStr, pos: int = 0,
endpos: int = -1) -> Match[AnyStr]: ...
def split(self, string: AnyStr, maxsplit: int = 0) -> list[AnyStr]: ...
def findall(self, string: AnyStr, pos: int = 0,
endpos: int = -1) -> list[AnyStr]: ...
def finditer(self, string: AnyStr, pos: int = 0,
endpos: int = -1) -> Iterator[Match[AnyStr]]: ...
def search(self, string: AnyStr, pos: int = ...,
endpos: int = ...) -> Match[AnyStr]: ...
def match(self, string: AnyStr, pos: int = ...,
endpos: int = ...) -> Match[AnyStr]: ...
def split(self, string: AnyStr, maxsplit: int = ...) -> list[AnyStr]: ...
def findall(self, string: AnyStr, pos: int = ...,
endpos: int = ...) -> list[AnyStr]: ...
def finditer(self, string: AnyStr, pos: int = ...,
endpos: int = ...) -> Iterator[Match[AnyStr]]: ...
@overload
def sub(self, repl: AnyStr, string: AnyStr,
count: int = 0) -> AnyStr: ...
count: int = ...) -> AnyStr: ...
@overload
def sub(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr,
count: int = 0) -> AnyStr: ...
count: int = ...) -> AnyStr: ...
@overload
def subn(self, repl: AnyStr, string: AnyStr,
count: int = 0) -> Tuple[AnyStr, int]: ...
count: int = ...) -> Tuple[AnyStr, int]: ...
@overload
def subn(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr,
count: int = 0) -> Tuple[AnyStr, int]: ...
count: int = ...) -> Tuple[AnyStr, int]: ...

View File

@@ -5,8 +5,8 @@ from typing import Any, Mapping, Union, Tuple, Sequence, IO
def url2pathname(pathname: str) -> str: ...
def pathname2url(pathname: str) -> str: ...
def urlopen(url: str, data=None, proxies: Mapping[str, str] = None, context=None) -> IO[Any]: ...
def urlretrieve(url, filename=None, reporthook=None, data=None, context=None): ...
def urlopen(url: str, data=..., proxies: Mapping[str, str] = ..., context=...) -> IO[Any]: ...
def urlretrieve(url, filename=..., reporthook=..., data=..., context=...): ...
def urlcleanup() -> None: ...
class ContentTooShortError(IOError):
@@ -22,24 +22,24 @@ class URLopener:
addheaders = ... # type: Any
tempcache = ... # type: Any
ftpcache = ... # type: Any
def __init__(self, proxies: Mapping[str, str] = None, context=None, **x509) -> None: ...
def __init__(self, proxies: Mapping[str, str] = ..., context=..., **x509) -> None: ...
def __del__(self): ...
def close(self): ...
def cleanup(self): ...
def addheader(self, *args): ...
type = ... # type: Any
def open(self, fullurl: str, data=None): ...
def open_unknown(self, fullurl, data=None): ...
def open_unknown_proxy(self, proxy, fullurl, data=None): ...
def retrieve(self, url, filename=None, reporthook=None, data=None): ...
def open_http(self, url, data=None): ...
def http_error(self, url, fp, errcode, errmsg, headers, data=None): ...
def open(self, fullurl: str, data=...): ...
def open_unknown(self, fullurl, data=...): ...
def open_unknown_proxy(self, proxy, fullurl, data=...): ...
def retrieve(self, url, filename=..., reporthook=..., data=...): ...
def open_http(self, url, data=...): ...
def http_error(self, url, fp, errcode, errmsg, headers, data=...): ...
def http_error_default(self, url, fp, errcode, errmsg, headers): ...
def open_https(self, url, data=None): ...
def open_https(self, url, data=...): ...
def open_file(self, url): ...
def open_local_file(self, url): ...
def open_ftp(self, url): ...
def open_data(self, url, data=None): ...
def open_data(self, url, data=...): ...
class FancyURLopener(URLopener):
auth_cache = ... # type: Any
@@ -47,18 +47,18 @@ class FancyURLopener(URLopener):
maxtries = ... # type: Any
def __init__(self, *args, **kwargs) -> None: ...
def http_error_default(self, url, fp, errcode, errmsg, headers): ...
def http_error_302(self, url, fp, errcode, errmsg, headers, data=None): ...
def http_error_302(self, url, fp, errcode, errmsg, headers, data=...): ...
def redirect_internal(self, url, fp, errcode, errmsg, headers, data): ...
def http_error_301(self, url, fp, errcode, errmsg, headers, data=None): ...
def http_error_303(self, url, fp, errcode, errmsg, headers, data=None): ...
def http_error_307(self, url, fp, errcode, errmsg, headers, data=None): ...
def http_error_401(self, url, fp, errcode, errmsg, headers, data=None): ...
def http_error_407(self, url, fp, errcode, errmsg, headers, data=None): ...
def retry_proxy_http_basic_auth(self, url, realm, data=None): ...
def retry_proxy_https_basic_auth(self, url, realm, data=None): ...
def retry_http_basic_auth(self, url, realm, data=None): ...
def retry_https_basic_auth(self, url, realm, data=None): ...
def get_user_passwd(self, host, realm, clear_cache=0): ...
def http_error_301(self, url, fp, errcode, errmsg, headers, data=...): ...
def http_error_303(self, url, fp, errcode, errmsg, headers, data=...): ...
def http_error_307(self, url, fp, errcode, errmsg, headers, data=...): ...
def http_error_401(self, url, fp, errcode, errmsg, headers, data=...): ...
def http_error_407(self, url, fp, errcode, errmsg, headers, data=...): ...
def retry_proxy_http_basic_auth(self, url, realm, data=...): ...
def retry_proxy_https_basic_auth(self, url, realm, data=...): ...
def retry_http_basic_auth(self, url, realm, data=...): ...
def retry_https_basic_auth(self, url, realm, data=...): ...
def get_user_passwd(self, host, realm, clear_cache=...): ...
def prompt_user_passwd(self, host, realm): ...
class ftpwrapper:
@@ -70,7 +70,7 @@ class ftpwrapper:
timeout = ... # type: Any
refcount = ... # type: Any
keepalive = ... # type: Any
def __init__(self, user, passwd, host, port, dirs, timeout=..., persistent=True) -> None: ...
def __init__(self, user, passwd, host, port, dirs, timeout=..., persistent=...) -> None: ...
busy = ... # type: Any
ftp = ... # type: Any
def init(self): ...
@@ -106,7 +106,7 @@ class addinfourl(addbase):
headers = ... # type: Any
url = ... # type: Any
code = ... # type: Any
def __init__(self, fp, headers, url, code=None) -> None: ...
def __init__(self, fp, headers, url, code=...) -> None: ...
def info(self): ...
def getcode(self): ...
def geturl(self): ...
@@ -117,16 +117,16 @@ def splithost(url): ...
def splituser(host): ...
def splitpasswd(user): ...
def splitport(host): ...
def splitnport(host, defport=-1): ...
def splitnport(host, defport=...): ...
def splitquery(url): ...
def splittag(url): ...
def splitattr(url): ...
def splitvalue(attr): ...
def unquote(s: str) -> str: ...
def unquote_plus(s: str) -> str: ...
def quote(s: str, safe='') -> str: ...
def quote_plus(s: str, safe='') -> str: ...
def urlencode(query: Union[Sequence[Tuple[Any, Any]], Mapping[Any, Any]], doseq=0) -> str: ...
def quote(s: str, safe=...) -> str: ...
def quote_plus(s: str, safe=...) -> str: ...
def urlencode(query: Union[Sequence[Tuple[Any, Any]], Mapping[Any, Any]], doseq=...) -> str: ...
def getproxies() -> Mapping[str, str]: ... # type: Any

View File

@@ -34,11 +34,11 @@ class ParseResult(NamedTuple('ParseResult', [
]), ResultMixin):
def geturl(self) -> str: ...
def urlparse(url: str, scheme: str = '', allow_fragments: bool = True) -> ParseResult: ...
def urlsplit(url: str, scheme: str = '', allow_fragments: bool = True) -> SplitResult: ...
def urlparse(url: str, scheme: str = ..., allow_fragments: bool = ...) -> ParseResult: ...
def urlsplit(url: str, scheme: str = ..., allow_fragments: bool = ...) -> SplitResult: ...
def urlunparse(data: Tuple[str, str, str, str, str, str]) -> str: ...
def urlunsplit(data: Tuple[str, str, str, str, str]) -> str: ...
def urljoin(base: str, url: str, allow_fragments: bool = True) -> str: ...
def urljoin(base: str, url: str, allow_fragments: bool = ...) -> str: ...
def urldefrag(url: str) -> str: ...
def unquote(s: str) -> str: ...
def parse_qs(qs: str, keep_blank_values: bool = ...,

View File

@@ -8,8 +8,8 @@ class _UUIDFields(NamedTuple('_UUIDFields',
clock_seq = ... # type: int
class UUID:
def __init__(self, hex: str = None, bytes: str = None, bytes_le: str = None,
fields: Tuple[int, int, int, int, int, int] = None, int: int = None, version: Any = None) -> None: ...
def __init__(self, hex: str = ..., bytes: str = ..., bytes_le: str = ...,
fields: Tuple[int, int, int, int, int, int] = ..., int: int = ..., version: Any = ...) -> None: ...
bytes = ... # type: str
bytes_le = ... # type: str
fields = ... # type: _UUIDFields
@@ -25,7 +25,7 @@ RESERVED_MICROSOFT = ... # type: int
RESERVED_FUTURE = ... # type: int
def getnode() -> int: ...
def uuid1(node: int = None, clock_seq: int = None) -> UUID: ...
def uuid1(node: int = ..., clock_seq: int = ...) -> UUID: ...
def uuid3(namespace: UUID, name: str) -> UUID: ...
def uuid4() -> UUID: ...
def uuid5(namespace: UUID, name: str) -> UUID: ...

View File

@@ -7,12 +7,12 @@ from typing import Mapping
from xml.sax import handler
from xml.sax import xmlreader
def escape(data: str, entities: Mapping[str, str] = None) -> str: ...
def unescape(data: str, entities: Mapping[str, str] = None) -> str: ...
def quoteattr(data: str, entities: Mapping[str, str] = None) -> str: ...
def escape(data: str, entities: Mapping[str, str] = ...) -> str: ...
def unescape(data: str, entities: Mapping[str, str] = ...) -> str: ...
def quoteattr(data: str, entities: Mapping[str, str] = ...) -> str: ...
class XMLGenerator(handler.ContentHandler):
def __init__(self, out=None, encoding='') -> None: ...
def __init__(self, out=..., encoding=...) -> None: ...
def startDocument(self): ...
def endDocument(self): ...
def startPrefixMapping(self, prefix, uri): ...
@@ -26,7 +26,7 @@ class XMLGenerator(handler.ContentHandler):
def processingInstruction(self, target, data): ...
class XMLFilterBase(xmlreader.XMLReader):
def __init__(self, parent=None) -> None: ...
def __init__(self, parent=...) -> None: ...
def error(self, exception): ...
def fatalError(self, exception): ...
def warning(self, exception): ...
@@ -55,4 +55,4 @@ class XMLFilterBase(xmlreader.XMLReader):
def getParent(self): ...
def setParent(self, parent): ...
def prepare_input_source(source, base=''): ...
def prepare_input_source(source, base=...): ...

View File

@@ -34,7 +34,7 @@ class Locator:
def getSystemId(self): ...
class InputSource:
def __init__(self, system_id=None) -> None: ...
def __init__(self, system_id=...) -> None: ...
def setPublicId(self, public_id): ...
def getPublicId(self): ...
def setSystemId(self, system_id): ...
@@ -61,7 +61,7 @@ class AttributesImpl:
def keys(self): ...
def has_key(self, name): ...
def __contains__(self, name): ...
def get(self, name, alternative=None): ...
def get(self, name, alternative=...): ...
def copy(self): ...
def items(self): ...
def values(self): ...