Fix some of the last default values that are not ... (#1731)

* still one left in atomicwrites that I need to investigate further
* fix atomicwrites
This commit is contained in:
Jelle Zijlstra
2017-11-13 07:08:30 -08:00
committed by Matthias Kramm
parent 69bffd154a
commit 533a05be45
3 changed files with 6 additions and 9 deletions

View File

@@ -1,16 +1,13 @@
import os
import sys
import tempfile
from typing import Any, AnyStr, Callable, ContextManager, IO, Iterator, Optional, Text
from typing import AnyStr, Callable, ContextManager, IO, Optional, Text, Type
def replace_atomic(src: AnyStr, dst: AnyStr) -> None: ...
def move_atomic(src: AnyStr, dst: AnyStr) -> None: ...
class AtomicWriter(object):
def __init__(self, path: AnyStr, mode: Text='w', overwrite: bool = ...) -> None: ...
def __init__(self, path: AnyStr, mode: Text = ..., overwrite: bool = ...) -> None: ...
def open(self) -> ContextManager[IO]: ...
def _open(self, get_fileobject: Callable) -> ContextManager[IO]: ...
def get_fileobject(self, dir: Optional[AnyStr] = ..., **kwargs) -> IO: ...
def sync(self, f: IO) -> None: ...
def commit(self, f: IO) -> None: ...
def rollback(self, f: IO) -> None: ...
def atomic_write(path: AnyStr, writer_cls: type=AtomicWriter, **cls_kwargs) -> ContextManager[IO]: ...
def atomic_write(path: AnyStr, writer_cls: Type[AtomicWriter] = ..., **cls_kwargs: object) -> ContextManager[IO]: ...

View File

@@ -28,7 +28,7 @@ class Attribute:
exclude_from_init: bool = ...,
exclude_from_repr: bool = ...,
exclude_from_immutable: bool = ...,
default_value: Any = NOTHING,
default_value: Any = ...,
default_factory: Optional[Callable[[None], Any]] = ...,
instance_of: Optional[Any] = ...,
init_aliaser: Optional[Callable[[AnyStr], AnyStr]] = strip_leading_underscores) -> None: ...
init_aliaser: Optional[Callable[[AnyStr], AnyStr]] = ...) -> None: ...

View File

@@ -16,7 +16,7 @@ def get(url: Union[Text, bytes],
Mapping[Text, _ParamsMappingValueType],
Mapping[bytes, _ParamsMappingValueType],
Mapping[int, _ParamsMappingValueType],
Mapping[float, _ParamsMappingValueType]]] = None,
Mapping[float, _ParamsMappingValueType]]] = ...,
**kwargs) -> Response: ...
def options(url: Union[str, Text], **kwargs) -> Response: ...
def head(url: Union[str, Text], **kwargs) -> Response: ...