Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions stubs/yt-dlp/yt_dlp/utils/_utils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,12 @@ def smuggle_url(url: str, data: Any) -> str: ... # data may be anything JSON se

# default is simply returned if #__youtubedl_smuggle is present.
def unsmuggle_url(smug_url: str, default: Any | None = None) -> tuple[str, Any]: ...
def format_decimal_suffix(num: FloatInt, fmt: str = "%d%s", *, factor: int = 1000) -> str: ...
def format_bytes(bytes: int) -> str: ...
def lookup_unit_table(unit_table: Mapping[str, int], s: str, strict: bool = False) -> float: ...
def parse_bytes(s: str) -> int: ...
def format_decimal_suffix(num: FloatInt | None, fmt: str = "%d%s", *, factor: int = 1000) -> str | None: ...
def format_bytes(bytes: FloatInt | None) -> str: ...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a full review, but FloatInt must not be used in new code.

def lookup_unit_table(unit_table: Mapping[str, int], s: str, strict: bool = False) -> int | None: ...
def parse_bytes(s: str) -> int | None: ...
def parse_filesize(s: str | None) -> int | None: ...
def parse_count(s: str | None) -> str | None: ...
def parse_count(s: str | None) -> int | None: ...
def parse_resolution(s: str, *, lenient: bool = False, parse_fps: bool = False) -> dict[str, int]: ...
def parse_bitrate(s: str | None) -> int | None: ...
def month_by_name(name: str, lang: str = "en") -> str | None: ...
Expand All @@ -350,7 +350,7 @@ def int_or_none(
v: Any, scale: int = 1, default: int | None = None, get_attr: str | None = None, invscale: int = 1, base: int | None = None
) -> int | None: ...
def str_or_none(v: Any, default: str | None = None) -> str: ...
def str_to_int(int_str: str) -> int: ...
def str_to_int(int_str: str | int | None) -> int | None: ...
def float_or_none(v: Any, scale: int = 1, invscale: int = 1, default: FloatInt | None = None) -> float | None: ...
def bool_or_none(v: Any, default: bool | None = None) -> bool | None: ...
def strip_or_none(v: Any, default: str | None = None) -> str | None: ...
Expand Down
Loading