mirror of
https://github.com/flibusta-apps/users_settings_server.git
synced 2025-12-06 14:45:38 +01:00
Update deps and lint
This commit is contained in:
@@ -2,18 +2,17 @@ exclude: 'docs|node_modules|migrations|.git|.tox'
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/ambv/black
|
||||
rev: 22.12.0
|
||||
rev: 23.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3.11
|
||||
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: 'v0.0.216'
|
||||
rev: 'v0.0.265'
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ["--force-exclude"]
|
||||
|
||||
- repo: https://github.com/crate-ci/typos
|
||||
rev: v1.13.6
|
||||
rev: typos-dict-v0.9.26
|
||||
hooks:
|
||||
- id: typos
|
||||
|
||||
1196
poetry.lock
generated
1196
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -6,24 +6,24 @@ authors = ["Kurbanov Bulat <kurbanovbul@gmail.com>"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.11"
|
||||
fastapi = "^0.95.0"
|
||||
fastapi-pagination = {extras = ["ormar"], version = "^0.11.4"}
|
||||
alembic = "^1.10.2"
|
||||
fastapi = "^0.95.1"
|
||||
fastapi-pagination = {extras = ["ormar"], version = "^0.12.3"}
|
||||
alembic = "^1.10.4"
|
||||
ormar = {extras = ["postgresql"], version = "^0.12.1"}
|
||||
uvicorn = {extras = ["standard"], version = "^0.21.1"}
|
||||
httpx = "^0.23.3"
|
||||
orjson = "^3.8.8"
|
||||
uvicorn = {extras = ["standard"], version = "^0.22.0"}
|
||||
httpx = "^0.24.0"
|
||||
orjson = "^3.8.12"
|
||||
prometheus-fastapi-instrumentator = "^6.0.0"
|
||||
uvloop = "^0.17.0"
|
||||
gunicorn = "^20.1.0"
|
||||
sentry-sdk = "^1.17.0"
|
||||
redis = {extras = ["hiredis"], version = "^4.5.4"}
|
||||
ormsgpack = "^1.2.5"
|
||||
sentry-sdk = "^1.22.2"
|
||||
redis = {extras = ["hiredis"], version = "^4.5.5"}
|
||||
ormsgpack = "^1.2.6"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pre-commit = "^2.21.0"
|
||||
pre-commit = "^3.3.1"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
@@ -65,14 +65,13 @@ max-complexity = 15
|
||||
[tool.ruff.isort]
|
||||
known-first-party = ["core", "app"]
|
||||
force-sort-within-sections = true
|
||||
force-wrap-aliases = true
|
||||
section-order = ["future", "standard-library", "base_framework", "framework_ext", "third-party", "first-party", "local-folder"]
|
||||
lines-after-imports = 2
|
||||
|
||||
# only_sections = true
|
||||
# force_sort_within_sections = true
|
||||
# lines_after_imports = 2
|
||||
# lexicographical = true
|
||||
# sections = ["FUTURE", "STDLIB", "BASEFRAMEWORK", "FRAMEWORKEXT", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
|
||||
# known_baseframework = ["fastapi",]
|
||||
# known_frameworkext = ["starlette",]
|
||||
[tool.ruff.isort.sections]
|
||||
base_framework = ["fastapi",]
|
||||
framework_ext = ["starlette"]
|
||||
|
||||
[tool.ruff.pyupgrade]
|
||||
keep-runtime-typing = true
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import httpx
|
||||
|
||||
|
||||
response = httpx.get("http://localhost:8080/healthcheck")
|
||||
print(f"HEALTHCHECK STATUS: {response.status_code}")
|
||||
exit(0 if response.status_code == 200 else 1)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from typing import Optional, Union
|
||||
|
||||
from fastapi import HTTPException, status
|
||||
|
||||
import ormsgpack
|
||||
from redis import asyncio as aioredis
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from datetime import datetime
|
||||
|
||||
from asyncpg.exceptions import UniqueViolationError
|
||||
from fastapi import APIRouter, Depends, HTTPException, Request, status
|
||||
|
||||
from asyncpg.exceptions import UniqueViolationError
|
||||
from fastapi_pagination import Page, Params
|
||||
from fastapi_pagination.ext.ormar import paginate
|
||||
from redis import asyncio as aioredis
|
||||
@@ -17,6 +18,7 @@ from app.serializers import (
|
||||
)
|
||||
from app.services.users_data_manager import UsersDataManager
|
||||
|
||||
|
||||
users_router = APIRouter(
|
||||
prefix="/users", tags=["users"], dependencies=[Depends(check_token)]
|
||||
)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.responses import ORJSONResponse
|
||||
|
||||
from fastapi_pagination import add_pagination
|
||||
from prometheus_fastapi_instrumentator import Instrumentator
|
||||
from redis import asyncio as aioredis
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from fastapi.security import APIKeyHeader
|
||||
|
||||
|
||||
default_security = APIKeyHeader(name="Authorization")
|
||||
|
||||
@@ -5,6 +5,7 @@ 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}"
|
||||
|
||||
@@ -4,6 +4,7 @@ from sentry_sdk.integrations.asgi import SentryAsgiMiddleware
|
||||
from core.app import start_app
|
||||
from core.config import env_config
|
||||
|
||||
|
||||
sentry_sdk.init(dsn=env_config.SENTRY_SDN)
|
||||
|
||||
app = SentryAsgiMiddleware(start_app())
|
||||
|
||||
Reference in New Issue
Block a user