Added Ruff linting
This commit is contained in:
1 parent
aa612103f4
commit
b3c16f78d6
5 files changed
+34
-5
No files matched your search
@@ -0,0 +1,28 @@
|
||||
[tool.ruff]
|
||||
line-length = 120
|
||||
target-version = "py312"
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E", "F", # pycodestyle errors, pyflakes (unused imports/variables, undefined names)
|
||||
"I", # import sorting (replaces isort)
|
||||
"B", # bugbear: likely bugs
|
||||
"ASYNC", # async mistakes
|
||||
"RUF006", # un-referenced asyncio.create_task (tasks can be garbage-collected)
|
||||
]
|
||||
ignore = ["E501"]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
known-first-party = ["db_module", "metrics_server", "rabbitmq_handler", "secret_manager",
|
||||
"simple_logger_handler", "uvicorn_logger_config", "validator"]
|
||||
|
||||
[tool.ruff.format]
|
||||
indent-style = "tab"
|
||||
|
||||
[tool.ruff.lint.flake8-bugbear]
|
||||
extend-immutable-calls = [
|
||||
"fastapi.Depends",
|
||||
"fastapi.Query",
|
||||
"fastapi.Header",
|
||||
"fastapi.Body",
|
||||
"fastapi.Security",
|
||||
]
|
||||
Reference in new issue
Block a user