From 6d9e9c7a8a719114eecdfdbcf66242b819c2793c Mon Sep 17 00:00:00 2001 From: Night Date: Mon, 26 Oct 2026 12:55:02 +1100 Subject: [PATCH 1/3] fix: generated code passes the format check with no author set * the @author line in file headers only carries a name when one is set * without a user_name in the Copier settings, the line no longer ends in spaces, which made make format-dry-run fail --- template/tests/test_main.py.jinja | 2 +- template/{{ module_slug }}/__init__.py.jinja | 2 +- template/{{ module_slug }}/__main__.py.jinja | 2 +- template/{{ module_slug }}/main.py.jinja | 2 +- .../{% if 'WebServer' in lib_pack %}api.py{% endif %}.jinja | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) 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 %} """ From b0590b1e45173712f4fdad41ac46b1cee3899ab6 Mon Sep 17 00:00:00 2001 From: Night Date: Mon, 26 Oct 2026 12:55:02 +1100 Subject: [PATCH 2/3] chore: version 3.0.1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 4a36342..cb2b00e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0 +3.0.1 From 78fda80cbd867b88ef9b6b6e904a465a591d4633 Mon Sep 17 00:00:00 2001 From: Night Date: Mon, 26 Oct 2026 12:55:02 +1100 Subject: [PATCH 3/3] docs: changelog for fix/empty-author * CHANGELOG.md records the fix; the README does not describe file headers, so it is unchanged --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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.