Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
john-kurkowski committed Nov 13, 2024
1 parent e73414b commit 100da81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tldextract/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _schemeless_url(url: str) -> str:
return url[2:]
if (
double_slashes_start < 2
or not url[double_slashes_start - 1] == ":"
or url[double_slashes_start - 1] != ":"
or set(url[: double_slashes_start - 1]) - scheme_chars_set
):
return url
Expand Down
4 changes: 2 additions & 2 deletions tldextract/tldextract.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ def _extract_netloc(
len(netloc_with_ascii_dots) >= min_num_ipv6_chars
and netloc_with_ascii_dots[0] == "["
and netloc_with_ascii_dots[-1] == "]"
and looks_like_ipv6(netloc_with_ascii_dots[1:-1])
):
if looks_like_ipv6(netloc_with_ascii_dots[1:-1]):
return ExtractResult("", netloc_with_ascii_dots, "", is_private=False)
return ExtractResult("", netloc_with_ascii_dots, "", is_private=False)

labels = netloc_with_ascii_dots.split(".")

Expand Down

0 comments on commit 100da81

Please sign in to comment.