Skip to content

Commit

Permalink
MAINT: simplify the condition of URL type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcBresson committed Dec 12, 2024
1 parent cbbcdcf commit 43f0b4c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions httpx/_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ def __init__(self, url: URL | str = "", **kwargs: typing.Any) -> None:
params = kwargs.pop("params")
kwargs["query"] = None if not params else str(QueryParams(params))

if isinstance(url, str):
self._uri_reference = urlparse(url, **kwargs)
elif isinstance(url, URL):
if isinstance(url, URL):
self._uri_reference = url._uri_reference.copy_with(**kwargs)
else:
self._uri_reference = urlparse(str(url), **kwargs)
Expand Down

0 comments on commit 43f0b4c

Please sign in to comment.