mirror of
https://github.com/flibusta-apps/users_settings_server.git
synced 2025-12-06 14:45:38 +01:00
Migrate to ruff
This commit is contained in:
@@ -5,22 +5,25 @@ description = ""
|
||||
authors = ["Kurbanov Bulat <kurbanovbul@gmail.com>"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.9"
|
||||
fastapi = "^0.85.1"
|
||||
fastapi-pagination = {extras = ["ormar"], version = "^0.10.0"}
|
||||
alembic = "^1.8.1"
|
||||
python = "^3.11"
|
||||
fastapi = "^0.89.0"
|
||||
fastapi-pagination = {extras = ["ormar"], version = "^0.11.1"}
|
||||
alembic = "^1.9.1"
|
||||
ormar = {extras = ["postgresql"], version = "^0.12.0"}
|
||||
uvicorn = {extras = ["standart"], version = "^0.19.0"}
|
||||
httpx = "^0.23.0"
|
||||
orjson = "^3.8.1"
|
||||
uvicorn = {extras = ["standard"], version = "^0.20.0"}
|
||||
httpx = "^0.23.3"
|
||||
orjson = "^3.8.4"
|
||||
prometheus-fastapi-instrumentator = "^5.9.1"
|
||||
uvloop = "^0.17.0"
|
||||
gunicorn = "^20.1.0"
|
||||
sentry-sdk = "^1.10.1"
|
||||
redis = {extras = ["hiredis"], version = "^4.3.4"}
|
||||
sentry-sdk = "^1.12.1"
|
||||
redis = {extras = ["hiredis"], version = "^4.4.0"}
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pre-commit = "^2.21.0"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
@@ -36,31 +39,38 @@ exclude = '''
|
||||
)/
|
||||
'''
|
||||
|
||||
[tool.flake8]
|
||||
ignore = [
|
||||
# Whitespace before ':' ( https://www.flake8rules.com/rules/E203.html )
|
||||
"E203"
|
||||
]
|
||||
max-line-length=88
|
||||
max-complexity = 15
|
||||
select = "B,C,E,F,W,T4,B9"
|
||||
[tool.ruff]
|
||||
fix = true
|
||||
target-version = "py311"
|
||||
src = ["app"]
|
||||
line-length=88
|
||||
ignore = []
|
||||
select = ["B", "C", "E", "F", "W", "B9", "I001"]
|
||||
exclude = [
|
||||
# No need to traverse our git directory
|
||||
".git",
|
||||
# There's no value in checking cache directories
|
||||
"__pycache__",
|
||||
# The conf file is mostly autogenerated, ignore it
|
||||
"src/app/alembic/*",
|
||||
# The old directory contains Flake8 2.0
|
||||
"src/app/alembic",
|
||||
]
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
only_sections = true
|
||||
force_sort_within_sections = true
|
||||
lines_after_imports = 2
|
||||
lexicographical = true
|
||||
sections = ["FUTURE", "STDLIB", "BASEFRAMEWORK", "FRAMEWORKEXT", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
|
||||
known_baseframework = ["fastapi",]
|
||||
known_frameworkext = ["starlette",]
|
||||
src_paths = ["src"]
|
||||
[tool.ruff.flake8-bugbear]
|
||||
extend-immutable-calls = ["fastapi.File", "fastapi.Form", "fastapi.Security"]
|
||||
|
||||
[tool.ruff.mccabe]
|
||||
max-complexity = 15
|
||||
|
||||
[tool.ruff.isort]
|
||||
known-first-party = ["core", "app"]
|
||||
|
||||
# only_sections = true
|
||||
# force_sort_within_sections = true
|
||||
# lines_after_imports = 2
|
||||
# lexicographical = true
|
||||
# sections = ["FUTURE", "STDLIB", "BASEFRAMEWORK", "FRAMEWORKEXT", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
|
||||
# known_baseframework = ["fastapi",]
|
||||
# known_frameworkext = ["starlette",]
|
||||
|
||||
[tool.ruff.pyupgrade]
|
||||
keep-runtime-typing = true
|
||||
|
||||
Reference in New Issue
Block a user