Add isort force-sort-within-sections

This commit is contained in:
2023-01-09 21:30:04 +01:00
parent ce1010f590
commit 105a79f541
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

@@ -63,6 +63,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,7 +1,7 @@
from typing import Optional, Union from typing import Optional, Union
import orjson
from fastapi import HTTPException, status from fastapi import HTTPException, status
import orjson
from redis import asyncio as aioredis from redis import asyncio as aioredis
from app.models import User from app.models import User