Skip to content
Merged
Changes from 2 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
10 changes: 7 additions & 3 deletions stdlib/urllib/parse.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ def urljoin(base: AnyStr, url: AnyStr | None, allow_fragments: bool = True) -> A
@overload
def urlparse(url: str, scheme: str = "", allow_fragments: bool = True) -> ParseResult: ...
@overload
def urlparse(url: bytes | bytearray, scheme: bytes | bytearray | None, allow_fragments: bool = True) -> ParseResultBytes: ...
def urlparse(
url: bytes | bytearray, scheme: bytes | bytearray | None | Literal[""] = "", allow_fragments: bool = True
) -> ParseResultBytes: ...
@overload
def urlparse(
url: None, scheme: bytes | bytearray | None | Literal[""] = "", allow_fragments: bool = True
Expand All @@ -202,13 +204,15 @@ def urlsplit(url: str, scheme: str = "", allow_fragments: bool = True) -> SplitR

if sys.version_info >= (3, 11):
@overload
def urlsplit(url: bytes, scheme: bytes | None, allow_fragments: bool = True) -> SplitResultBytes: ...
def urlsplit(url: bytes, scheme: bytes | None | Literal[""] = "", allow_fragments: bool = True) -> SplitResultBytes: ...
@overload
def urlsplit(url: None, scheme: bytes | None | Literal[""] = "", allow_fragments: bool = True) -> SplitResultBytes: ...

else:
@overload
def urlsplit(url: bytes | bytearray, scheme: bytes | bytearray | None, allow_fragments: bool = True) -> SplitResultBytes: ...
def urlsplit(
url: bytes | bytearray, scheme: bytes | bytearray | None | Literal[""] = "", allow_fragments: bool = True
) -> SplitResultBytes: ...
@overload
def urlsplit(
url: None, scheme: bytes | bytearray | None | Literal[""] = "", allow_fragments: bool = True
Expand Down