Skip to content

Wrap long fields in generated Python - #171

Merged
glopesdev merged 2 commits into
harp-tech:mainfrom
glopesdev:wrap-long-python-fields
Oct 30, 2026
Merged

glopesdev merged 2 commits into
harp-tech:mainfrom
glopesdev:wrap-long-python-fields

Conversation

@glopesdev

Copy link
Copy Markdown
Contributor

Field declarations in the generated Python module that exceed 100 characters break after the opening parenthesis of their descriptor. The arguments follow on one indented line, or one per line with a trailing comma when that line still exceeds the limit, which is the layout ruff format produces. The generated module is then unchanged by ruff format at a line length of 100, so it can be checked by a formatter without being rewritten.

The template helper for documentation comments also returns complete comment lines, so both helpers return lines that templates write as returned. Generated C# output is unchanged.

Field declarations longer than 100 characters break after the opening
parenthesis, with the arguments on one indented line, or one per line
with a trailing comma when they still do not fit.
The helper for documentation comments returns complete comment lines,
indent included.
@glopesdev glopesdev added the feature New planned feature label Oct 30, 2026
@glopesdev
glopesdev merged commit 61634b7 into harp-tech:main Oct 30, 2026
9 checks passed
@glopesdev
glopesdev deleted the wrap-long-python-fields branch October 30, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New planned feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant