Migrate to ruff

This commit is contained in:
2023-01-08 00:08:00 +01:00
parent 537e28d904
commit 06fcdfd83a
16 changed files with 657 additions and 342 deletions

View File

@@ -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,
)

View File

@@ -1,4 +1,3 @@
from fastapi.security import APIKeyHeader
default_security = APIKeyHeader(name="Authorization")

View File

@@ -2,7 +2,6 @@ from typing import Optional
from pydantic import BaseModel, BaseSettings
BotToken = str
TelethonSessionName = str

View File

@@ -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}"