Skip to content

Commit

Permalink
per-file-ignores instead of exclude.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tester authored and Tester committed Feb 13, 2024
1 parent 32620a0 commit 2e95f26
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
9 changes: 8 additions & 1 deletion httpcore/_async/connection_pool.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 8 additions & 1 deletion httpcore/_sync/connection_pool.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ include = [
"tests/*",
]

[tool.ruff]
exclude = [
"httpcore/_sync",
"tests/_sync",
]

[tool.ruff.lint]
select = [
"E",
Expand All @@ -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"]
2 changes: 1 addition & 1 deletion tests/_async/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ssl

import pytest
import pytest # noqa: F401

import httpcore

Expand Down
2 changes: 1 addition & 1 deletion tests/_sync/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ssl

import pytest
import pytest # noqa: F401

import httpcore

Expand Down

0 comments on commit 2e95f26

Please sign in to comment.