diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a446f09..c3d77d6 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -8,12 +8,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10"] fail-fast: false services: sqldb: - image: postgres:13 + image: postgres:14 env: POSTGRES_USER: user POSTGRES_PASSWORD: secret diff --git a/db/Dockerfile b/db/Dockerfile index 6d3c800..d2223b8 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -1,5 +1,5 @@ # pull official base image -FROM postgres:13-alpine +FROM postgres:14-alpine # run create.sql on init ADD create.sql /docker-entrypoint-initdb.d diff --git a/the_app/api/stuff.py b/the_app/api/stuff.py index e1f57a7..93b8acf 100644 --- a/the_app/api/stuff.py +++ b/the_app/api/stuff.py @@ -1,5 +1,3 @@ -from typing import List - from fastapi import APIRouter, Depends, HTTPException, status from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.ext.asyncio import AsyncSession @@ -15,7 +13,7 @@ logger = get_logger(__name__) @router.post("/add_many", status_code=status.HTTP_201_CREATED) -async def create_multi_stuff(payload: List[StuffSchema], db_session: AsyncSession = Depends(get_db)): +async def create_multi_stuff(payload: list[StuffSchema], db_session: AsyncSession = Depends(get_db)): try: stuff_instances = [Stuff(name=stuf.name, description=stuf.description) for stuf in payload] db_session.add_all(stuff_instances) diff --git a/the_app/models/__init__.py b/the_app/models/__init__.py index 63287f6..abb31f4 100644 --- a/the_app/models/__init__.py +++ b/the_app/models/__init__.py @@ -1,3 +1,3 @@ from the_app.models.nonsense import Nonsense # noqa -from the_app.models.stuff import Stuff # noqa from the_app.models.shakespeare import Character # noqa +from the_app.models.stuff import Stuff # noqa