Annotate humanfriendly.__init__.pyi (#6209)

This commit is contained in:
Huw Jones
2021-10-28 15:16:54 +01:00
committed by GitHub
parent ce7484f70b
commit b98cd0c3b0

View File

@@ -1,32 +1,33 @@
from typing import Any, NamedTuple
import datetime
from typing import Any, NamedTuple, Pattern
class SizeUnit(NamedTuple):
divider: Any
symbol: Any
name: Any
divider: int
symbol: str
name: str
class CombinedUnit(NamedTuple):
decimal: Any
binary: Any
decimal: SizeUnit
binary: SizeUnit
disk_size_units: Any
length_size_units: Any
time_units: Any
def coerce_boolean(value): ...
def coerce_pattern(value, flags: int = ...): ...
def coerce_seconds(value): ...
def format_size(num_bytes, keep_width: bool = ..., binary: bool = ...): ...
def parse_size(size, binary: bool = ...): ...
def format_length(num_metres, keep_width: bool = ...): ...
def parse_length(length): ...
def format_number(number, num_decimals: int = ...): ...
def round_number(count, keep_width: bool = ...): ...
def format_timespan(num_seconds, detailed: bool = ..., max_units: int = ...): ...
def parse_timespan(timespan): ...
def parse_date(datestring): ...
def format_path(pathname): ...
def parse_path(pathname): ...
def coerce_boolean(value: object) -> bool: ...
def coerce_pattern(value: str | Pattern[str], flags: int = ...) -> Pattern[str]: ...
def coerce_seconds(value: float | datetime.timedelta) -> float: ...
def format_size(num_bytes: float, keep_width: bool = ..., binary: bool = ...) -> str: ...
def parse_size(size: str, binary: bool = ...) -> int: ...
def format_length(num_metres: float, keep_width: bool = ...) -> str: ...
def parse_length(length: str) -> float: ...
def format_number(number: float, num_decimals: int = ...) -> str: ...
def round_number(count: float, keep_width: bool = ...) -> str: ...
def format_timespan(num_seconds: float | datetime.timedelta, detailed: bool = ..., max_units: int = ...) -> str: ...
def parse_timespan(timespan: str) -> float: ...
def parse_date(datestring: str) -> tuple[int, int, int, int, int, int]: ...
def format_path(pathname: str) -> str: ...
def parse_path(pathname: str) -> str: ...
class Timer:
monotonic: bool
@@ -36,7 +37,7 @@ class Timer:
def __init__(self, start_time: Any | None = ..., resumable: bool = ...) -> None: ...
def __enter__(self): ...
def __exit__(self, exc_type: Any | None = ..., exc_value: Any | None = ..., traceback: Any | None = ...) -> None: ...
def sleep(self, seconds) -> None: ...
def sleep(self, seconds: float) -> None: ...
@property
def elapsed_time(self): ...
@property