diff --git a/CHANGELOG.md b/CHANGELOG.md index 7976061..cb10aab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,3 +13,4 @@ * fix/bash-history-mount: shell history in the dev container persists between sessions. * feature/version-file: generated projects take their package version from VERSION; existing projects run `uv lock` once after updating. * feature/plain-version: VERSION holds a plain X.Y.Z here and in generated projects, with CI adding the v for tags; existing projects remove the v from VERSION once. +* fix/empty-author: generated code passes make format-dry-run when no author is set in the Copier settings. diff --git a/VERSION b/VERSION index 4a36342..cb2b00e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0 +3.0.1 diff --git a/template/tests/test_main.py.jinja b/template/tests/test_main.py.jinja index 8609549..f72f31b 100644 --- a/template/tests/test_main.py.jinja +++ b/template/tests/test_main.py.jinja @@ -2,7 +2,7 @@ Copyright (c) {{ year }} Apache-2.0 license @file -@author {{ user_name }} +@author{% if user_name %} {{ user_name }}{% endif %} @brief Tests for the command-line options """ diff --git a/template/{{ module_slug }}/__init__.py.jinja b/template/{{ module_slug }}/__init__.py.jinja index d6d499e..19f2cec 100755 --- a/template/{{ module_slug }}/__init__.py.jinja +++ b/template/{{ module_slug }}/__init__.py.jinja @@ -2,7 +2,7 @@ Copyright (c) {{ year }} Apache-2.0 license @file -@author {{ user_name }} +@author{% if user_name %} {{ user_name }}{% endif %} @brief{% if project_description %} {{ project_description }}{% endif %} """ diff --git a/template/{{ module_slug }}/__main__.py.jinja b/template/{{ module_slug }}/__main__.py.jinja index 30aa26d..13bfcb9 100755 --- a/template/{{ module_slug }}/__main__.py.jinja +++ b/template/{{ module_slug }}/__main__.py.jinja @@ -2,7 +2,7 @@ Copyright (c) {{ year }} Apache-2.0 license @file -@author {{ user_name }} +@author{% if user_name %} {{ user_name }}{% endif %} @brief Main entry point """ diff --git a/template/{{ module_slug }}/main.py.jinja b/template/{{ module_slug }}/main.py.jinja index 968f6cb..701585c 100755 --- a/template/{{ module_slug }}/main.py.jinja +++ b/template/{{ module_slug }}/main.py.jinja @@ -2,7 +2,7 @@ Copyright (c) {{ year }} Apache-2.0 license @file -@author {{ user_name }} +@author{% if user_name %} {{ user_name }}{% endif %} @brief Main file """ diff --git a/template/{{ module_slug }}/{% if 'WebServer' in lib_pack %}api.py{% endif %}.jinja b/template/{{ module_slug }}/{% if 'WebServer' in lib_pack %}api.py{% endif %}.jinja index 13950e5..8a536cf 100644 --- a/template/{{ module_slug }}/{% if 'WebServer' in lib_pack %}api.py{% endif %}.jinja +++ b/template/{{ module_slug }}/{% if 'WebServer' in lib_pack %}api.py{% endif %}.jinja @@ -3,7 +3,7 @@ Copyright (c) {{ year }} Apache-2.0 license @file -@author {{ user_name }} +@author{% if user_name %} {{ user_name }}{% endif %} @brief FastAPI server{% if project_description %} for {{ project_description }}{% endif %} """