Skip to content

Commit

Permalink
add and update code with pyupdate to 3.13 version
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanprytula committed Dec 16, 2024
1 parent 9d3915e commit 2ed22ee
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ repos:
# Run the formatter.
- id: ruff-format

- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py313-plus]

# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
ci:
autoupdate_schedule: weekly
Expand Down
2 changes: 1 addition & 1 deletion microservices/backend/app/api/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
reusable_oauth2 = OAuth2PasswordBearer(tokenUrl=f"{settings.API_V1_STR}/login/access-token")


def get_db() -> Generator[Session, None, None]:
def get_db() -> Generator[Session]:
with Session(engine) as session:
yield session

Expand Down
3 changes: 1 addition & 2 deletions microservices/backend/app/core/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import secrets
import warnings
from typing import Annotated, Any, Literal
from typing import Annotated, Any, Literal, Self

from pydantic import (
AnyUrl,
Expand All @@ -12,7 +12,6 @@
)
from pydantic_core import MultiHostUrl
from pydantic_settings import BaseSettings, SettingsConfigDict
from typing_extensions import Self


def parse_cors(v: Any) -> list[str] | str:
Expand Down
4 changes: 2 additions & 2 deletions microservices/backend/app/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


@pytest.fixture(scope="session", autouse=True)
def db() -> Generator[Session, None, None]:
def db() -> Generator[Session]:
with Session(engine) as session:
init_db(session)
yield session
Expand All @@ -25,7 +25,7 @@ def db() -> Generator[Session, None, None]:


@pytest.fixture(scope="module")
def client() -> Generator[TestClient, None, None]:
def client() -> Generator[TestClient]:
with TestClient(app) as c:
yield c

Expand Down
2 changes: 1 addition & 1 deletion microservices/backend/compose.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:
- ./backend/htmlcov:/app/htmlcov
environment:
SMTP_HOST: "localhost"
SMTP_PORT: "9025"
SMTP_PORT: "1025"
SMTP_TLS: "false"
EMAILS_FROM_EMAIL: "[email protected]"

Expand Down
1 change: 1 addition & 0 deletions microservices/backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies = [
"pydantic-settings>=2.2.1,<3.0.0",
"pydantic[email]>=2.10.3",
"pyjwt>=2.10.1",
"python-multipart>=0.0.7,<1.0.0",
"sqlmodel>=0.0.22,<1.0.0",
"tenacity>=9.0.0",
]
Expand Down
2 changes: 2 additions & 0 deletions microservices/backend/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2ed22ee

Please sign in to comment.