diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 5832d19..91f9a20 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -1,4 +1,4 @@ -name: 'deploy' +name: 'deploy to v2' on: [push] jobs: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c858fd7..64c27d0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: check-merge-conflict - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.13 + rev: v0.1.15 hooks: - id: ruff args: [--fix] diff --git a/pyproject.toml b/pyproject.toml index 3c67e08..3dd7512 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ mypy = { version = "^1.7", python = ">=3.12" } isort = "^5.13.2" pyright = "^1.1.341" pre-commit = "^3.6.0" +pytest-asyncio = "^0.23.4" [tool.black] line-length = 120 @@ -102,3 +103,13 @@ select = ["E4", "E7", "E9", "F"] ignore = [] line-length = 120 target-version = "py312" + + + +[tool.pytest.ini_options] +pythonpath = [ + "." +] + +[tool.pytest] +python_files = "*_test.py" diff --git a/services/db.py b/services/db.py index e9b15d6..427254c 100644 --- a/services/db.py +++ b/services/db.py @@ -3,8 +3,7 @@ from typing import Any, Callable, Dict, TypeVar # from psycopg2.errors import UniqueViolation from sqlalchemy import Column, Integer, create_engine -from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.orm import Session +from sqlalchemy.orm import Session, declarative_base from sqlalchemy.sql.schema import Table from settings import DB_URL