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