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 @@ -275,10 +275,10 @@ class UnsafeExecExpansionError(YoutubeDLError): ...

def is_path_like(f: Any) -> bool: ... # Type checker.
def extract_timezone(date_str: str, default: Any = None) -> tuple[timedelta, str]: ... # Any or type[NO_DEFAULT]
def parse_iso8601(date_str: str, delimiter: str = "T", timezone: type[NO_DEFAULT] | Any | None = None) -> int: ...
def parse_iso8601(date_str: str | None, delimiter: str = "T", timezone: type[NO_DEFAULT] | Any | None = None) -> int | None: ...
def date_formats(day_first: bool = True) -> list[str]: ...
def unified_strdate(date_str: str, day_first: bool = True) -> str: ...
def unified_timestamp(date_str: str, day_first: bool = True, tz_offset: FloatInt = 0) -> int: ...
def unified_strdate(date_str: str | None, day_first: bool = True) -> str | None: ...
def unified_timestamp(date_str: str | None, day_first: bool = True, tz_offset: FloatInt = 0) -> int | None: ...
def determine_ext(url: str, default_ext: str = "unknown_video") -> str: ...
def subtitles_filename(filename: str, sub_lang: str, sub_format: str, expected_real_ext: str | None = None) -> str: ...
def datetime_from_str(date_str: str, precision: str = "auto", format: str = "%Y%m%d") -> datetime: ...
Expand Down Expand Up @@ -334,7 +334,7 @@ def parse_bytes(s: str) -> int: ...
def parse_filesize(s: str | None) -> int | None: ...
def parse_count(s: str | None) -> str | None: ...
def parse_resolution(s: str, *, lenient: bool = False, parse_fps: bool = False) -> dict[str, int]: ...
def parse_bitrate(s: str) -> int: ...
def parse_bitrate(s: str | None) -> int | None: ...
def month_by_name(name: str, lang: str = "en") -> str | None: ...
def month_by_abbreviation(abbrev: str) -> str | None: ...
def fix_xml_ampersands(xml_str: str) -> str: ...
Expand All @@ -345,7 +345,7 @@ def remove_quotes(s: str) -> str: ...
def get_domain(url: str) -> str | None: ...
def url_basename(url: str) -> str: ...
def base_url(url: str) -> str: ...
def urljoin(base: str, path: str) -> str: ...
def urljoin(base: str | None, path: str | None) -> str | None: ...
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: ...
Expand All @@ -356,7 +356,7 @@ def bool_or_none(v: Any, default: bool | None = None) -> bool | None: ...
def strip_or_none(v: Any, default: str | None = None) -> str | None: ...
def url_or_none(url: Any) -> str | None: ...
def strftime_or_none(timestamp: int, date_format: str = "%Y%m%d", default: str | None = None) -> str | None: ...
def parse_duration(s: str | None) -> float: ...
def parse_duration(s: str | None) -> float | None: ...
def prepend_extension(filename: str, ext: str, expected_real_ext: str | None = None) -> str: ...
def replace_extension(filename: str, ext: str, expected_real_ext: str | None = None) -> str: ...
def check_executable(exe: str, args: Iterable[str] = []) -> str | None: ...
Expand Down
Loading