Skip to content

Commit

Permalink
raise error - None is not using with isinstance, check must by is None
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemIsmagilov committed Jun 13, 2024
1 parent 9625bc6 commit 286549a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion caldav/lib/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +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 isinstance(url, (URL, None)):
if url is None or isinstance(url, URL):
return url
else:
return URL(url)
Expand Down

0 comments on commit 286549a

Please sign in to comment.