cmds.projects.CmdCreateFile: Fix spurious newline and --format help #99
Merged
Jan Lindemannmerged 2 commits from jan/fix/20260913-cmds-projects-cmdcreatefile-fix-spurious-newline-and-format-help into master2026-09-13 22:27:27 +02:00
AGit
The possible values of --format are defined by an Enum which is never
really used as such. Derive them from class introspection instead, i.e.
offer all formats that have a corresponding render_<format>() name.
Also, turn the option into real argparse-backed choices, and make the
argument mandatory, because that reflects the reality of the implementation
- there is no default.
Signed-off-by: Jan Lindemann <jan@janware.com>
create-file and create-pkg-config both print the rendered template with a
newline appended over the original template, owed to using print() instead
of sys.stdout.write(). Fix that.
Signed-off-by: Jan Lindemann <jan@janware.com>