mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 06:35:38 +01:00
Add isort force-sort-within-sections
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -64,6 +64,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
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import collections
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
import random
|
||||
from datetime import timedelta
|
||||
from tempfile import SpooledTemporaryFile
|
||||
from typing import Optional, cast
|
||||
|
||||
import httpx
|
||||
from arq.connections import ArqRedis
|
||||
from arq.worker import Retry
|
||||
from fastapi import UploadFile
|
||||
import httpx
|
||||
from redis import asyncio as aioredis
|
||||
from redis.exceptions import LockError
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ from fastapi import FastAPI
|
||||
from fastapi.responses import ORJSONResponse
|
||||
from prometheus_fastapi_instrumentator import Instrumentator
|
||||
|
||||
import core.sentry # noqa: F401
|
||||
from app.views import healthcheck_router, router
|
||||
from core.arq_pool import get_arq_pool
|
||||
from core.db import database
|
||||
from core.redis_client import get_client
|
||||
import core.sentry # noqa: F401
|
||||
|
||||
|
||||
def start_app() -> FastAPI:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import msgpack
|
||||
from arq.connections import ArqRedis, RedisSettings, create_pool
|
||||
import msgpack
|
||||
|
||||
from core.config import env_config
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import msgpack
|
||||
|
||||
import core.sentry # noqa: F401
|
||||
from app.services.cache_updater import (
|
||||
cache_file_by_book_id,
|
||||
check_books,
|
||||
@@ -9,6 +8,7 @@ from app.services.cache_updater import (
|
||||
from core.arq_pool import get_arq_pool, get_redis_settings
|
||||
from core.db import database
|
||||
from core.redis_client import get_client
|
||||
import core.sentry # noqa: F401
|
||||
|
||||
|
||||
async def startup(ctx):
|
||||
|
||||
Reference in New Issue
Block a user