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 = [
134
134
[tool .ruff ]
135
135
target-version = " py39"
136
136
line-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
+ ]
137
142
extend-exclude = [
138
143
" docs" ,
139
144
]
@@ -146,6 +151,7 @@ select = [
146
151
" I" , # isort
147
152
" N" , # pep8-naming
148
153
" S" , # flake8-bandit
154
+ " TID" , # flake8-tidy-imports
149
155
" RUF" , # ruff-specific-rules
150
156
]
151
157
# Ignoring rules problematic with formatter
Original file line number Diff line number Diff line change 1
1
from .bootstrap import application_init
2
2
from .config import AppConfig
3
+
4
+ __all__ = ["AppConfig" , "application_init" ]
Original file line number Diff line number Diff line change 5
5
from opentelemetry .sdk ._logs import LoggingHandler
6
6
from structlog .typing import Processor
7
7
8
- from ..config import AppConfig
8
+ from common .config import AppConfig
9
+
9
10
from .processors import (
10
11
add_logging_open_telemetry_spans ,
11
12
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