mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
fix code lint
This commit is contained in:
parent
92249e1b8b
commit
bacd7ba6de
@ -10,7 +10,7 @@ FROM base AS install
|
||||
WORKDIR /home/code
|
||||
|
||||
# allow controlling the poetry installation of dependencies via external args
|
||||
ARG INSTALL_ARGS="--no-root --only main"
|
||||
ARG INSTALL_ARGS="--no-root"
|
||||
ENV POETRY_HOME="/opt/poetry"
|
||||
ENV PATH="$POETRY_HOME/bin:$PATH"
|
||||
COPY pyproject.toml poetry.lock ./
|
||||
|
@ -1,5 +1,4 @@
|
||||
import uuid
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import HTTPException, status
|
||||
from sqlalchemy import String, select
|
||||
@ -15,7 +14,7 @@ class Nonsense(Base):
|
||||
__table_args__ = ({"schema": "happy_hog"},)
|
||||
id: Mapped[uuid:UUID] = mapped_column(UUID(as_uuid=True), unique=True, default=uuid.uuid4, autoincrement=True)
|
||||
name: Mapped[str] = mapped_column(String, primary_key=True, unique=True)
|
||||
description: Mapped[Optional[str]]
|
||||
description: Mapped[str | None]
|
||||
# TODO: apply relation to other tables
|
||||
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import uuid
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import HTTPException, status
|
||||
from sqlalchemy import String, select
|
||||
@ -15,7 +14,7 @@ class Stuff(Base):
|
||||
__table_args__ = ({"schema": "happy_hog"},)
|
||||
id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), unique=True, default=uuid.uuid4, autoincrement=True)
|
||||
name: Mapped[str] = mapped_column(String, primary_key=True, unique=True)
|
||||
description: Mapped[Optional[str]]
|
||||
description: Mapped[str | None]
|
||||
|
||||
@classmethod
|
||||
async def find(cls, db_session: AsyncSession, name: str):
|
||||
|
@ -3,7 +3,7 @@ from typing import Any
|
||||
|
||||
import bcrypt
|
||||
from passlib.context import CryptContext
|
||||
from sqlalchemy import Column, String, LargeBinary, select
|
||||
from sqlalchemy import String, LargeBinary, select
|
||||
from sqlalchemy.dialects.postgresql import UUID
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from sqlalchemy.orm import mapped_column, Mapped
|
||||
|
@ -15,9 +15,7 @@ services:
|
||||
--reload --log-level debug
|
||||
"
|
||||
volumes:
|
||||
- ./app:/home/code/app
|
||||
- ./tests:/home/code/tests
|
||||
- ./alembic:/home/code/alembic
|
||||
- .:/home/code
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
|
Loading…
x
Reference in New Issue
Block a user