Skip to content

Commit

Permalink
black test
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelErsh committed Mar 15, 2024
1 parent 802cc6c commit 587ef29
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 3 deletions.
51 changes: 50 additions & 1 deletion async_api/poetry.lock

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

2 changes: 2 additions & 0 deletions async_api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ fastapi = "^0.110.0"
pydantic = "^2.6.4"
uvicorn = "^0.28.0"
uvloop = "^0.19.0"
flake8 = "^7.0.0"
black = "^24.2.0"

[tool.poetry.group.dev.dependencies] # https://python-poetry.org/docs/master/managing-dependencies/
black = "^24.2.0"
Expand Down
4 changes: 2 additions & 2 deletions async_api/src/api/v1/films.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class Film(BaseModel):
title: str


@router.get('/{film_id}', response_model=Film)
@router.get("/{film_id}", response_model=Film)
async def film_details(film_id: str, film_service: FilmService = Depends(get_film_service)) -> Film:
film = await film_service.get_by_id(film_id)
if not film:
raise HTTPException(status_code=HTTPStatus.NOT_FOUND, detail='film not found')
raise HTTPException(status_code=HTTPStatus.NOT_FOUND, detail="film not found")
return Film(id=film.id, title=film.title)

0 comments on commit 587ef29

Please sign in to comment.