diff --git a/httpx/_utils.py b/httpx/_utils.py index 2568fdca1c..a3a045da05 100644 --- a/httpx/_utils.py +++ b/httpx/_utils.py @@ -464,7 +464,7 @@ 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 @@ -472,6 +472,6 @@ def is_ipv4_hostname(hostname: str) -> bool: def is_ipv6_hostname(hostname: str) -> bool: try: ipaddress.IPv6Address(hostname.split("/")[0]) - except: + except Exception: return False return True diff --git a/scripts/check b/scripts/check index 1ac6b99072..3b41a9a8b2 100755 --- a/scripts/check +++ b/scripts/check @@ -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