From 3572efee847809e8b23cc068aee1146e89593b64 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 11:11:18 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/backend/app/projects/project_crud.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/backend/app/projects/project_crud.py b/src/backend/app/projects/project_crud.py index a274cd18af..ec6552d06d 100644 --- a/src/backend/app/projects/project_crud.py +++ b/src/backend/app/projects/project_crud.py @@ -2814,7 +2814,11 @@ def is_valid_coordinate(coord): raise HTTPException(status_code=400, detail=error_message) -def get_tasks_count(db:Session, project_id:int): - db_task = db.query(db_models.DbProject).filter(db_models.DbProject.id==project_id).first() +def get_tasks_count(db: Session, project_id: int): + db_task = ( + db.query(db_models.DbProject) + .filter(db_models.DbProject.id == project_id) + .first() + ) task_count = len(db_task.tasks) - return task_count \ No newline at end of file + return task_count