diff --git a/httpcore/_async/connection_pool.py b/httpcore/_async/connection_pool.py index e993afea..5d701bd5 100644 --- a/httpcore/_async/connection_pool.py +++ b/httpcore/_async/connection_pool.py @@ -1,7 +1,14 @@ import ssl import sys from types import TracebackType -from typing import AsyncIterable, AsyncIterator, Iterable, List, Optional, Type +from typing import ( # noqa: F811 + AsyncIterable, + AsyncIterator, + Iterable, + List, + Optional, + Type, +) from .._backends.auto import AutoBackend from .._backends.base import SOCKET_OPTION, AsyncNetworkBackend diff --git a/httpcore/_sync/connection_pool.py b/httpcore/_sync/connection_pool.py index 5894261a..a9eddf99 100644 --- a/httpcore/_sync/connection_pool.py +++ b/httpcore/_sync/connection_pool.py @@ -1,7 +1,14 @@ import ssl import sys from types import TracebackType -from typing import Iterable, Iterator, Iterable, List, Optional, Type +from typing import ( # noqa: F811 + Iterable, + Iterator, + Iterable, + List, + Optional, + Type, +) from .._backends.sync import SyncBackend from .._backends.base import SOCKET_OPTION, NetworkBackend diff --git a/pyproject.toml b/pyproject.toml index 9bf77ea4..e5c20dad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,12 +104,6 @@ include = [ "tests/*", ] -[tool.ruff] -exclude = [ - "httpcore/_sync", - "tests/_sync", -] - [tool.ruff.lint] select = [ "E", @@ -120,3 +114,8 @@ select = [ [tool.ruff.lint.isort] combine-as-imports = true + +[tool.ruff.lint.per-file-ignores] +# needed for unasync.py +"httpcore/_sync/*" = ["I001"] +"tests/_sync/*" = ["I001"] diff --git a/tests/_async/test_integration.py b/tests/_async/test_integration.py index 1970531d..afa5dd9e 100644 --- a/tests/_async/test_integration.py +++ b/tests/_async/test_integration.py @@ -1,6 +1,6 @@ import ssl -import pytest +import pytest # noqa: F401 import httpcore diff --git a/tests/_sync/test_integration.py b/tests/_sync/test_integration.py index e3327e69..07254f66 100644 --- a/tests/_sync/test_integration.py +++ b/tests/_sync/test_integration.py @@ -1,6 +1,6 @@ import ssl -import pytest +import pytest # noqa: F401 import httpcore