Skip to content

Commit

Permalink
use isinstance with tuple classes (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemIsmagilov authored and tobixen committed Oct 20, 2024
1 parent 770813e commit 24b4c5c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions caldav/lib/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ def __hash__(self) -> int:
# object, else will instantiate a new URL object
@classmethod
def objectify(self, url: Union[Self, str, ParseResult, SplitResult]) -> "URL":
if url is None:
return None
if isinstance(url, URL):
if url is None or isinstance(url, URL):
return url
else:
return URL(url)
Expand Down

0 comments on commit 24b4c5c

Please sign in to comment.