Skip to content

Commit 2e95f26

Browse files
TesterTester
Tester
authored and
Tester
committed
per-file-ignores instead of exclude.
1 parent 32620a0 commit 2e95f26

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

httpcore/_async/connection_pool.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import ssl
22
import sys
33
from types import TracebackType
4-
from typing import AsyncIterable, AsyncIterator, Iterable, List, Optional, Type
4+
from typing import ( # noqa: F811
5+
AsyncIterable,
6+
AsyncIterator,
7+
Iterable,
8+
List,
9+
Optional,
10+
Type,
11+
)
512

613
from .._backends.auto import AutoBackend
714
from .._backends.base import SOCKET_OPTION, AsyncNetworkBackend

httpcore/_sync/connection_pool.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import ssl
22
import sys
33
from types import TracebackType
4-
from typing import Iterable, Iterator, Iterable, List, Optional, Type
4+
from typing import ( # noqa: F811
5+
Iterable,
6+
Iterator,
7+
Iterable,
8+
List,
9+
Optional,
10+
Type,
11+
)
512

613
from .._backends.sync import SyncBackend
714
from .._backends.base import SOCKET_OPTION, NetworkBackend

pyproject.toml

+5-6
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,6 @@ include = [
104104
"tests/*",
105105
]
106106

107-
[tool.ruff]
108-
exclude = [
109-
"httpcore/_sync",
110-
"tests/_sync",
111-
]
112-
113107
[tool.ruff.lint]
114108
select = [
115109
"E",
@@ -120,3 +114,8 @@ select = [
120114

121115
[tool.ruff.lint.isort]
122116
combine-as-imports = true
117+
118+
[tool.ruff.lint.per-file-ignores]
119+
# needed for unasync.py
120+
"httpcore/_sync/*" = ["I001"]
121+
"tests/_sync/*" = ["I001"]

tests/_async/test_integration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ssl
22

3-
import pytest
3+
import pytest # noqa: F401
44

55
import httpcore
66

tests/_sync/test_integration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ssl
22

3-
import pytest
3+
import pytest # noqa: F401
44

55
import httpcore
66

0 commit comments

Comments
 (0)