From 21571acc9fdc558e4f4f1f0bff226c8cf8610da8 Mon Sep 17 00:00:00 2001 From: Prodesire Date: Thu, 1 Mar 2018 18:48:32 +0800 Subject: [PATCH] using another style for optional arg --- stubs/pydu/cmd.pyi | 10 +++++----- stubs/pydu/dict.pyi | 4 ++-- stubs/pydu/list.pyi | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/stubs/pydu/cmd.pyi b/stubs/pydu/cmd.pyi index 6dd6662..6a08d8d 100644 --- a/stubs/pydu/cmd.pyi +++ b/stubs/pydu/cmd.pyi @@ -1,22 +1,22 @@ """Stubs for cmd""" -from typing import Optional, Tuple, List, Union +from typing import Tuple, List, Union class TimeoutExpired(Exception): def __init__(self, cmd: str, timeout: Union[int, float], - output: Optional[str]=..., - stderr: Optional[str]=...) -> None: ... + output: dict=None, + stderr: dict=None) -> None: ... def run(cmd: str, shell: bool=..., - env: Optional[dict]=..., + env: dict=None, timeout: Union[int, float]=..., timeinterval: Union[int, float]=...) -> Tuple[int, str]: ... def run_with_en_env(cmd: str, shell: bool=..., - env: Optional[dict]=..., + env: dict=None, timeout: Union[int, float]=..., timeinterval: Union[int, float]=...) -> Tuple[int, str]: ... def terminate(pid: int) -> None: ... diff --git a/stubs/pydu/dict.pyi b/stubs/pydu/dict.pyi index ed8cfa0..112905f 100644 --- a/stubs/pydu/dict.pyi +++ b/stubs/pydu/dict.pyi @@ -1,8 +1,8 @@ import collections -from typing import Iterable, Tuple, Any, Optional +from typing import Iterable, Tuple, Any class CaseInsensitiveDict(collections.MutableMapping): _store = ... # type: dict - def __init__(self, data: Optional[dict], **kwargs) -> None: ... + def __init__(self, data: dict=None, **kwargs) -> None: ... def lower_items(self) -> Iterable[Tuple[str, Any]]: ... diff --git a/stubs/pydu/list.pyi b/stubs/pydu/list.pyi index f3d1a76..fa32943 100644 --- a/stubs/pydu/list.pyi +++ b/stubs/pydu/list.pyi @@ -1,7 +1,7 @@ -from typing import Optional, Callable, Any, Hashable, Iterable +from typing import Callable, Any, Hashable, Iterable KeyFunc = Callable[[Any], Hashable] -def uniq(seq: Iterable[Any], key: Optional[KeyFunc]) -> list: ... +def uniq(seq: Iterable[Any], key: KeyFunc=None) -> list: ... def tolist(obj: Any) -> list: ... def flatten(seq: Iterable[Any]) -> Iterable[Any]: ...