From 105a79f541423f41d7e8c02f040184d7b1a8917d Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Mon, 9 Jan 2023 21:30:04 +0100 Subject: [PATCH] Add isort force-sort-within-sections --- .pre-commit-config.yaml | 2 +- pyproject.toml | 1 + src/app/services/users_data_manager.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4a7701d..1f2d22e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: language_version: python3.11 - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.0.213' + rev: 'v0.0.216' hooks: - id: ruff args: ["--force-exclude"] diff --git a/pyproject.toml b/pyproject.toml index 61154ca..24f33ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,6 +63,7 @@ max-complexity = 15 [tool.ruff.isort] known-first-party = ["core", "app"] +force-sort-within-sections = true # only_sections = true # force_sort_within_sections = true diff --git a/src/app/services/users_data_manager.py b/src/app/services/users_data_manager.py index acd49a7..ed482b5 100644 --- a/src/app/services/users_data_manager.py +++ b/src/app/services/users_data_manager.py @@ -1,7 +1,7 @@ from typing import Optional, Union -import orjson from fastapi import HTTPException, status +import orjson from redis import asyncio as aioredis from app.models import User