mirror of https://github.com/flaggo/pydu.git
using another style for optional arg
This commit is contained in:
parent
baad7f8d55
commit
21571acc9f
|
@ -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: ...
|
||||
|
|
|
@ -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]]: ...
|
||||
|
|
|
@ -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]: ...
|
||||
|
|
Loading…
Reference in New Issue