Skip to content

Commit 32e2549

Browse files
authored
Fix ruff error and script (#2680)
1 parent 472597f commit 32e2549

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

httpx/_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,14 +464,14 @@ def __eq__(self, other: typing.Any) -> bool:
464464
def is_ipv4_hostname(hostname: str) -> bool:
465465
try:
466466
ipaddress.IPv4Address(hostname.split("/")[0])
467-
except:
467+
except Exception:
468468
return False
469469
return True
470470

471471

472472
def is_ipv6_hostname(hostname: str) -> bool:
473473
try:
474474
ipaddress.IPv6Address(hostname.split("/")[0])
475-
except:
475+
except Exception:
476476
return False
477477
return True

scripts/check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ set -x
1111
./scripts/sync-version
1212
${PREFIX}black --check --diff --target-version=py37 $SOURCE_FILES
1313
${PREFIX}mypy $SOURCE_FILES
14-
${PREFIX}ruff check --diff $SOURCE_FILES
14+
${PREFIX}ruff check $SOURCE_FILES

0 commit comments

Comments
 (0)