Skip to content

Commit

Permalink
Fix ruff error and script (#2680)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee authored Apr 26, 2023
1 parent 472597f commit 32e2549
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions httpx/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,14 +464,14 @@ def __eq__(self, other: typing.Any) -> bool:
def is_ipv4_hostname(hostname: str) -> bool:
try:
ipaddress.IPv4Address(hostname.split("/")[0])
except:
except Exception:
return False
return True


def is_ipv6_hostname(hostname: str) -> bool:
try:
ipaddress.IPv6Address(hostname.split("/")[0])
except:
except Exception:
return False
return True
2 changes: 1 addition & 1 deletion scripts/check
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ set -x
./scripts/sync-version
${PREFIX}black --check --diff --target-version=py37 $SOURCE_FILES
${PREFIX}mypy $SOURCE_FILES
${PREFIX}ruff check --diff $SOURCE_FILES
${PREFIX}ruff check $SOURCE_FILES

0 comments on commit 32e2549

Please sign in to comment.