Skip to content

Commit

Permalink
Formatting to conform to style guide.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmreding committed Sep 16, 2024
1 parent a6ec4d6 commit 56d048e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def _is_local(self, target: str) -> bool:
if hostname == "localhost" or hostname == "LOCALHOST":
return True

# IPv6 addresses don't support parsing with leading/trailing brackets so we need to remove them.
# IPv6 addresses don't support parsing with leading/trailing brackets
# so we need to remove them.
match = re.match(r"^\[(.*)\]$", hostname)
if match:
hostname = match.group(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
@pytest.mark.parametrize(
"target,expected_result",
[
("127.0.0.1", False), # Port must be specified explicitly
("[::1]", False), # Port must be specified explicitly
("localhost", False), # Port must be specified explicitly
("127.0.0.1", False), # Port must be specified explicitly
("[::1]", False), # Port must be specified explicitly
("localhost", False), # Port must be specified explicitly
("127.0.0.1:100", True),
("[::1]:100", True),
("localhost:100", True),
("http://127.0.0.1", False), # Port must be specified explicitly
("http://[::1]", False), # Port must be specified explicitly
("http://localhost", False), # Port must be specified explicitly
("http://127.0.0.1", False), # Port must be specified explicitly
("http://[::1]", False), # Port must be specified explicitly
("http://localhost", False), # Port must be specified explicitly
("http://127.0.0.1:100", True),
("http://[::1]:100", True),
("http://localhost:100", True),
Expand Down

0 comments on commit 56d048e

Please sign in to comment.