Add isort force-sort-within-sections

This commit is contained in:
2023-01-09 21:33:35 +01:00
parent db82fc6951
commit 23ce83b202
3 changed files with 3 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ repos:
language_version: python3.11 language_version: python3.11
- repo: https://github.com/charliermarsh/ruff-pre-commit - repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.213' rev: 'v0.0.216'
hooks: hooks:
- id: ruff - id: ruff
args: ["--force-exclude"] args: ["--force-exclude"]

View File

@@ -57,6 +57,7 @@ max-complexity = 15
[tool.ruff.isort] [tool.ruff.isort]
known-first-party = ["core", "app"] known-first-party = ["core", "app"]
force-sort-within-sections = true
# only_sections = true # only_sections = true
# force_sort_within_sections = true # force_sort_within_sections = true

View File

@@ -1,5 +1,5 @@
import sentry_sdk
from fastapi import FastAPI from fastapi import FastAPI
import sentry_sdk
from app.views import router from app.views import router
from core.config import env_config from core.config import env_config