Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
proafxin committed Jun 15, 2024
1 parent 156e1f9 commit 94eb656
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
5 changes: 2 additions & 3 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ lint:
- Dockerfile
- .github/workflows/*.yml
actions:
disabled:
enabled:
- trunk-upgrade-available
- trunk-announce
- trunk-check-pre-push
- trunk-fmt-pre-commit
enabled:
- trunk-upgrade-available
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

SQLALCHEMY_DATABASE_URL = "sqlite+aiosqlite:///./test_db.db"

engine = create_async_engine(SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False})
engine = create_async_engine(
SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
)


@pytest_asyncio.fixture(scope="class")
Expand Down
4 changes: 3 additions & 1 deletion tracker/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
await engine.dispose()

Check warning on line 24 in tracker/main.py

View check run for this annotation

Codecov / codecov/patch

tracker/main.py#L20-L24

Added lines #L20 - L24 were not covered by tests


app = FastAPI(title="Bug Tracker", description="Simple bug tracking API.", lifespan=lifespan)
app = FastAPI(

Check warning on line 27 in tracker/main.py

View check run for this annotation

Codecov / codecov/patch

tracker/main.py#L27

Added line #L27 was not covered by tests
title="Bug Tracker", description="Simple bug tracking API.", lifespan=lifespan
)
4 changes: 3 additions & 1 deletion tracker/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ class Base(BaseModel):
__abstract__ = True

id: Mapped[int] = Column(Integer, primary_key=True, autoincrement=True, index=True)
created_at: Mapped[TIMESTAMP] = Column(TIMESTAMP, server_default=func.now(), index=True)
created_at: Mapped[TIMESTAMP] = Column(
TIMESTAMP, server_default=func.now(), index=True
)
updated_at: Mapped[TIMESTAMP] = Column(
TIMESTAMP,
server_default=func.now(),
Expand Down
4 changes: 3 additions & 1 deletion tracker/views/bug.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ async def create(bug: BugInput, db: Annotated[AsyncSession, Depends(get_db)]):


@router.get("/bugs/", response_model=list[BugOutput])
async def get(db: Annotated[AsyncSession, Depends(get_db)], skip: int = 0, limit: int = 10):
async def get(
db: Annotated[AsyncSession, Depends(get_db)], skip: int = 0, limit: int = 10
):
return await bugs(db=db, skip=skip, limit=limit)


Expand Down
4 changes: 3 additions & 1 deletion tracker/views/story.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ async def create(story: StoryInput, db: Annotated[AsyncSession, Depends(get_db)]


@router.get("/stories/", response_model=list[StoryOutput])
async def get_stories(db: Annotated[AsyncSession, Depends(get_db)], skip: int = 0, limit: int = 10):
async def get_stories(
db: Annotated[AsyncSession, Depends(get_db)], skip: int = 0, limit: int = 10
):
return await stories(db=db, skip=skip, limit=limit)


Expand Down

0 comments on commit 94eb656

Please sign in to comment.