File tree Expand file tree Collapse file tree 12 files changed +185
-133
lines changed Expand file tree Collapse file tree 12 files changed +185
-133
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,11 @@ testpaths = [
134134[tool .ruff ]
135135target-version = " py39"
136136line-length = 120
137+ # The `src` settings makes sure that imports are correctly
138+ # evaluated during formatting when using nested `pyproject.toml`
139+ src = [
140+ " src" ,
141+ ]
137142extend-exclude = [
138143 " docs" ,
139144]
@@ -146,6 +151,7 @@ select = [
146151 " I" , # isort
147152 " N" , # pep8-naming
148153 " S" , # flake8-bandit
154+ " TID" , # flake8-tidy-imports
149155 " RUF" , # ruff-specific-rules
150156]
151157# Ignoring rules problematic with formatter
Original file line number Diff line number Diff line change 11from .bootstrap import application_init
22from .config import AppConfig
3+
4+ __all__ = ["AppConfig" , "application_init" ]
Original file line number Diff line number Diff line change 55from opentelemetry .sdk ._logs import LoggingHandler
66from structlog .typing import Processor
77
8- from ..config import AppConfig
8+ from common .config import AppConfig
9+
910from .processors import (
1011 add_logging_open_telemetry_spans ,
1112 drop_color_message_key ,
Original file line number Diff line number Diff line change 1+ [tool .ruff ]
2+ # Extend the `pyproject.toml` file in the parent directory...
3+ extend = " ../../pyproject.toml"
4+
5+ [tool .ruff .lint .flake8-tidy-imports .banned-api ]
6+ "domains".msg = " Clean Architecture dependency rule break: import of `domains` is not allowed"
7+ "dramatiq_worker".msg = " Clean Architecture dependency rule break: import of `dramatiq_worker` is not allowed"
8+ "http_app".msg = " Clean Architecture dependency rule break: import of `http_app` is not allowed"
9+ "gateways".msg = " Clean Architecture dependency rule break: import of `gateways` is not allowed"
10+ "migrations".msg = " Clean Architecture dependency rule break: import of `migrations` is not allowed"
11+ "socketio_app".msg = " Clean Architecture dependency rule break: import of `socketio_app` is not allowed"
12+
13+ # These ignore rules suggest these modules should not be inside `common`.
14+ [tool .ruff .lint .per-file-ignores ]
15+ "storage/**/*.py" = [" TID251" ] # Storage is allowed to import domains module as it needs the models
16+ "di_container.py" = [" TID251" ] # DI Container is allowed to import domains module
Original file line number Diff line number Diff line change 1+ [tool .ruff ]
2+ # Extend the `pyproject.toml` file in the parent directory...
3+ extend = " ../../pyproject.toml"
4+
5+ [tool .ruff .lint .flake8-tidy-imports .banned-api ]
6+ "dramatiq_worker".msg = " Clean Architecture dependency rule break: import of `dramatiq_worker` is not allowed"
7+ "http_app".msg = " Clean Architecture dependency rule break: import of `http_app` is not allowed"
8+ "gateways".msg = " Clean Architecture dependency rule break: import of `gateways` is not allowed"
9+ "migrations".msg = " Clean Architecture dependency rule break: import of `migrations` is not allowed"
10+ "socketio_app".msg = " Clean Architecture dependency rule break: import of `socketio_app` is not allowed"
Original file line number Diff line number Diff line change 1+ [tool .ruff ]
2+ # Extend the `pyproject.toml` file in the parent directory...
3+ extend = " ../../pyproject.toml"
4+
5+ [tool .ruff .lint .flake8-tidy-imports .banned-api ]
6+ "http_app".msg = " Clean Architecture dependency rule break: import of `http_app` is not allowed"
7+ "gateways".msg = " Clean Architecture dependency rule break: import of `gateways` is not allowed"
8+ "migrations".msg = " Clean Architecture dependency rule break: import of `migrations` is not allowed"
9+ "socketio_app".msg = " Clean Architecture dependency rule break: import of `socketio_app` is not allowed"
Original file line number Diff line number Diff line change 1+ [tool .ruff ]
2+ # Extend the `pyproject.toml` file in the parent directory...
3+ extend = " ../../pyproject.toml"
4+
5+ [tool .ruff .lint .flake8-tidy-imports .banned-api ]
6+ "domains".msg = " Clean Architecture dependency rule break: import of `domains` is not allowed"
7+ "dramatiq_worker".msg = " Clean Architecture dependency rule break: import of `dramatiq_worker` is not allowed"
8+ "http_app".msg = " Clean Architecture dependency rule break: import of `http_app` is not allowed"
9+ "gateways".msg = " Clean Architecture dependency rule break: import of `gateways` is not allowed"
10+ "migrations".msg = " Clean Architecture dependency rule break: import of `migrations` is not allowed"
11+ "socketio_app".msg = " Clean Architecture dependency rule break: import of `socketio_app` is not allowed"
Original file line number Diff line number Diff line change 1+ [tool .ruff ]
2+ # Extend the `pyproject.toml` file in the parent directory...
3+ extend = " ../../pyproject.toml"
4+
5+ [tool .ruff .lint .flake8-tidy-imports .banned-api ]
6+ "dramatiq_worker".msg = " Clean Architecture dependency rule break: import of `dramatiq_worker` is not allowed"
7+ "gateways".msg = " Clean Architecture dependency rule break: import of `gateways` is not allowed"
8+ "migrations".msg = " Clean Architecture dependency rule break: import of `migrations` is not allowed"
9+ "socketio_app".msg = " Clean Architecture dependency rule break: import of `socketio_app` is not allowed"
Original file line number Diff line number Diff line change 1+ [tool .ruff ]
2+ # Extend the `pyproject.toml` file in the parent directory...
3+ extend = " ../../pyproject.toml"
4+
5+ [tool .ruff .lint .flake8-tidy-imports .banned-api ]
6+ "dramatiq_worker".msg = " Clean Architecture dependency rule break: import of `dramatiq_worker` is not allowed"
7+ "http_app".msg = " Clean Architecture dependency rule break: import of `http_app` is not allowed"
8+ "gateways".msg = " Clean Architecture dependency rule break: import of `gateways` is not allowed"
9+ "socketio_app".msg = " Clean Architecture dependency rule break: import of `socketio_app` is not allowed"
Original file line number Diff line number Diff line change 1+ [tool .ruff ]
2+ # Extend the `pyproject.toml` file in the parent directory...
3+ extend = " ../../pyproject.toml"
4+
5+ [tool .ruff .lint .flake8-tidy-imports .banned-api ]
6+ "dramatiq_worker".msg = " Clean Architecture dependency rule break: import of `dramatiq_worker` is not allowed"
7+ "http_app".msg = " Clean Architecture dependency rule break: import of `http_app` is not allowed"
8+ "gateways".msg = " Clean Architecture dependency rule break: import of `gateways` is not allowed"
9+ "migrations".msg = " Clean Architecture dependency rule break: import of `migrations` is not allowed"
You can’t perform that action at this time.
0 commit comments