From a445a139c404fed2ceaca3b0994a6776af3c8f95 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Mon, 25 Nov 2024 14:07:53 -0800 Subject: [PATCH] Fix minor issues in FastAPI UWS app template Fix a few issues in the `fastapi_safir_app` template with UWS enabled that are autometically corrected by Ruff. --- .../src/{{cookiecutter.module_name}}/dependencies.py | 4 ++-- .../src/{{cookiecutter.module_name}}/domain.py | 2 +- .../src/{{cookiecutter.module_name}}/workers/uws.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/dependencies.py b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/dependencies.py index 5ce0eccd..304d406f 100644 --- a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/dependencies.py +++ b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/dependencies.py @@ -1,9 +1,9 @@ -{%- if cookiecutter.flavor == "UWS" %} +{%- if cookiecutter.flavor == "UWS" -%} """Job parameter dependencies.""" from typing import Annotated -from fastapi import Depends, Request +from fastapi import Depends from safir.uws import UWSJobParameter, uws_post_params_dependency __all__ = [ diff --git a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/domain.py b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/domain.py index dbd6a5ed..f1af6868 100644 --- a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/domain.py +++ b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/domain.py @@ -1,4 +1,4 @@ -{%- if cookiecutter.flavor == "UWS" %} +{%- if cookiecutter.flavor == "UWS" -%} """Domain models for {{ cookiecutter.name }}.""" from __future__ import annotations diff --git a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/workers/uws.py b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/workers/uws.py index 14b4ba93..92b6356c 100644 --- a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/workers/uws.py +++ b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/workers/uws.py @@ -1,4 +1,4 @@ -{%- if cookiecutter.flavor == "UWS" %} +{%- if cookiecutter.flavor == "UWS" -%} """Worker for UWS database updates.""" from __future__ import annotations