Formatting everything with black

This commit is contained in:
Ian Roddis committed 2026-06-22 14:56:51 -03:00
1 parent 42a11c0dc6
commit a3539beda9
20 files changed
+173 -18

No files matched your search

+1
View File
@@ -3,6 +3,7 @@
Settings are read from environment variables first, then from a `.env` file.
Environment variables always take precedence over the file.
"""
from functools import lru_cache
from pydantic_settings import BaseSettings, SettingsConfigDict
+1
View File
@@ -2,6 +2,7 @@
Works with SQLite (aiosqlite) or Postgres (asyncpg) depending on DATABASE_URL.
"""
from collections.abc import AsyncGenerator
from sqlalchemy.ext.asyncio import (
+3
View File
@@ -1,4 +1,5 @@
"""Password hashing and JWT token helpers."""
import hashlib
import uuid
from datetime import UTC, datetime, timedelta
@@ -14,6 +15,7 @@ REFRESH_TOKEN_TYPE = "refresh"
# --- Passwords ---------------------------------------------------------------
def hash_password(password: str) -> str:
return bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
@@ -27,6 +29,7 @@ def verify_password(password: str, hashed: str) -> bool:
# --- JWT ---------------------------------------------------------------------
def _create_token(
subject: str | int,
expires_delta: timedelta,