Skip to content

Commit

Permalink
lint: add ruff TID check
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancetnik committed Sep 13, 2024
1 parent dc8deef commit 6b638c7
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 17 deletions.
6 changes: 1 addition & 5 deletions faststream/_internal/broker/abc_broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
Optional,
)

from ..types import (
BrokerMiddleware,
CustomCallable,
MsgType,
)
from faststream._internal.types import BrokerMiddleware, CustomCallable, MsgType

if TYPE_CHECKING:
from fast_depends.dependencies import Depends
Expand Down
2 changes: 1 addition & 1 deletion faststream/_internal/broker/logging_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from typing_extensions import Annotated, Doc

from faststream._internal.constants import EMPTY
from faststream._internal.types import MsgType

from ..types import MsgType
from .abc_broker import ABCBroker

if TYPE_CHECKING:
Expand Down
3 changes: 2 additions & 1 deletion faststream/_internal/broker/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
Optional,
)

from ..types import (
from faststream._internal.types import (
BrokerMiddleware,
CustomCallable,
MsgType,
)

from .abc_broker import ABCBroker

if TYPE_CHECKING:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ select = [
"PT", # flake8-pytest-style https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
"PTH", # flake8-use-pathlib https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"TCH", # flake8-type-checking https://docs.astral.sh/ruff/rules/#flake8-type-checking-tch
"TID", # flake8-tidy-imports https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid
"RUF", # Ruff-specific rules https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"PERF", # Perflint https://docs.astral.sh/ruff/rules/#perflint-perf
"UP", # pyupgrade https://docs.astral.sh/ruff/rules/#pyupgrade-up
Expand Down
3 changes: 1 addition & 2 deletions tests/opentelemetry/confluent/test_confluent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
from faststream.opentelemetry.consts import MESSAGING_DESTINATION_PUBLISH_NAME
from faststream.opentelemetry.middleware import MessageAction as Action
from tests.brokers.confluent.basic import ConfluentTestcaseConfig

from ..basic import LocalTelemetryTestcase
from tests.opentelemetry.basic import LocalTelemetryTestcase


@pytest.mark.confluent
Expand Down
3 changes: 1 addition & 2 deletions tests/opentelemetry/kafka/test_kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
from faststream.opentelemetry.middleware import MessageAction as Action
from tests.brokers.kafka.test_consume import TestConsume
from tests.brokers.kafka.test_publish import TestPublish

from ..basic import LocalTelemetryTestcase
from tests.opentelemetry.basic import LocalTelemetryTestcase


@pytest.mark.kafka
Expand Down
3 changes: 1 addition & 2 deletions tests/opentelemetry/nats/test_nats.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
from faststream.nats.opentelemetry import NatsTelemetryMiddleware
from tests.brokers.nats.test_consume import TestConsume
from tests.brokers.nats.test_publish import TestPublish

from ..basic import LocalTelemetryTestcase
from tests.opentelemetry.basic import LocalTelemetryTestcase


@pytest.fixture
Expand Down
3 changes: 1 addition & 2 deletions tests/opentelemetry/rabbit/test_rabbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
from faststream.rabbit.opentelemetry import RabbitTelemetryMiddleware
from tests.brokers.rabbit.test_consume import TestConsume
from tests.brokers.rabbit.test_publish import TestPublish

from ..basic import LocalTelemetryTestcase
from tests.opentelemetry.basic import LocalTelemetryTestcase


@pytest.fixture
Expand Down
3 changes: 1 addition & 2 deletions tests/opentelemetry/redis/test_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
TestConsumeStream,
)
from tests.brokers.redis.test_publish import TestPublish

from ..basic import LocalTelemetryTestcase
from tests.opentelemetry.basic import LocalTelemetryTestcase


@pytest.mark.redis
Expand Down

0 comments on commit 6b638c7

Please sign in to comment.