From 533a05be45a83040b4ca561d80f51ebe4edc74c4 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 13 Nov 2017 07:08:30 -0800 Subject: [PATCH] Fix some of the last default values that are not ... (#1731) * still one left in atomicwrites that I need to investigate further * fix atomicwrites --- third_party/2and3/atomicwrites/__init__.pyi | 9 +++------ third_party/2and3/characteristic/__init__.pyi | 4 ++-- third_party/2and3/requests/api.pyi | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/third_party/2and3/atomicwrites/__init__.pyi b/third_party/2and3/atomicwrites/__init__.pyi index 3ec566a4f..07edff697 100644 --- a/third_party/2and3/atomicwrites/__init__.pyi +++ b/third_party/2and3/atomicwrites/__init__.pyi @@ -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]: ... diff --git a/third_party/2and3/characteristic/__init__.pyi b/third_party/2and3/characteristic/__init__.pyi index bb2204c0c..20bd6e58a 100644 --- a/third_party/2and3/characteristic/__init__.pyi +++ b/third_party/2and3/characteristic/__init__.pyi @@ -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: ... diff --git a/third_party/2and3/requests/api.pyi b/third_party/2and3/requests/api.pyi index e4534754a..98fdc5acb 100644 --- a/third_party/2and3/requests/api.pyi +++ b/third_party/2and3/requests/api.pyi @@ -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: ...