mirror of
https://github.com/flibusta-apps/telegram_files_server.git
synced 2025-12-06 20:45:37 +01:00
Migrate to ruff
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
import sentry_sdk
|
||||
from fastapi import FastAPI
|
||||
from fastapi.responses import ORJSONResponse
|
||||
|
||||
from prometheus_fastapi_instrumentator import Instrumentator
|
||||
import sentry_sdk
|
||||
|
||||
from app.on_start import on_start
|
||||
from app.views import router, healthcheck_router
|
||||
from app.views import healthcheck_router, router
|
||||
from core.config import env_config
|
||||
from core.db import database
|
||||
|
||||
|
||||
sentry_sdk.init(
|
||||
env_config.SENTRY_DSN,
|
||||
)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from fastapi.security import APIKeyHeader
|
||||
|
||||
|
||||
default_security = APIKeyHeader(name="Authorization")
|
||||
|
||||
@@ -2,7 +2,6 @@ from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, BaseSettings
|
||||
|
||||
|
||||
BotToken = str
|
||||
TelethonSessionName = str
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ from sqlalchemy import MetaData
|
||||
|
||||
from core.config import env_config
|
||||
|
||||
|
||||
DATABASE_URL = (
|
||||
f"postgresql://{env_config.POSTGRES_USER}:{quote(env_config.POSTGRES_PASSWORD)}@"
|
||||
f"{env_config.POSTGRES_HOST}:{env_config.POSTGRES_PORT}/{env_config.POSTGRES_DB}"
|
||||
|
||||
Reference in New Issue
Block a user