Improve %pyproject_check_import newline handling#9
Conversation
|
Is there a check section with empty lines that's not multiline? Shouldn't the multiline check always pass for a check section with empty lines? |
Apparently, |
You are right, every section with empty lines has to also be multiline, but not vice versa – a multiline section doesn't have to contain an empty line. |
|
So, checking only for being multiline should be sufficient. I.e. something like: if len(l for l in sections.check if l.strip()) > 1:
# add the empty line |
6f24426 to
ec5ec4c
Compare
|
Symplified and you can check the result here: frenzymadness@9e23300 |
Add smart newline logic after %pyproject_check_import based on existing %check section content (adds blank line iff %check was multiline). This ensures consistent spec file formatting while avoiding unnecessary blank lines in simple check sections.
ec5ec4c to
82c64b4
Compare
|
Thank you. I'll make a release and push the spec change. |
Add smart newline logic after %pyproject_check_import based on existing
%check section content (adds blank line if section has empty lines or
is multiline)
This ensures consistent spec file formatting while avoiding unnecessary
blank lines in simple check sections.
The content of the second commit is just what happened when I ran
tox. Can be removed or kept as you wish.Should I push updated
specfilessomewhere for review?