feat: add validate_path function and InvalidURL, CookieConflict exception classes

This commit is contained in:
Bakyt Niiazaliev 2025-07-07 20:18:30 +07:00
parent 33f8a422eb
commit f2d70ca1a8

View File

@ -175,3 +175,16 @@ def quote(string: str, safe: str) -> str:
def unquote(value: str) -> str: ...
def find_ascii_non_printable(s: str) -> typing.Optional[int]: ...
def validate_path(path: str, has_scheme: bool, has_authority: bool) -> None: ...
class InvalidURL(Exception):
def __init__(self, message: str) -> None: ...
class CookieConflict(Exception):
"""
Attempted to lookup a cookie by name, but multiple cookies existed.
Can occur when calling `response.cookies.get(...)`.
"""
def __init__(self, message: str) -> None: ...