Skip to content

Commit

Permalink
Update yarl/_url.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Sep 26, 2024
1 parent 31da379 commit 86a0677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yarl/_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ def _encode_host(cls, host: str, human: bool = False) -> str:
raw_ip = host
sep = zone = ""

if raw_ip and (":" in raw_ip or raw_ip[-1].isdigit()):
if raw_ip and (raw_ip[-1].isdigit() or ":" in raw_ip):
# Might be an IP address, check it
#
# IP Addresses can look like:
Expand Down

0 comments on commit 86a0677

Please sign in to comment.