Skip to content

Remove redundant commas of tail null values#180

Merged
marshallward merged 1 commit intomainfrom
no_extra_end_comma
Oct 7, 2025
Merged

Remove redundant commas of tail null values#180
marshallward merged 1 commit intomainfrom
no_extra_end_comma

Conversation

@marshallward
Copy link
Copy Markdown
Owner

Certain compilers require null value assignments to end with commas. The Namelist writer contains a special rule to append this comma.

If end_comma is enabled, which always finalizes values with commas, then this would append a second comma, which would transform the record into two null values.

This patch prevents the redundant comma if end_commas are enabled.

Thanks to Paul Leopardi (@penguian) for reporting.

Certain compilers require null value assignments to end with commas.
The `Namelist` writer contains a special rule to append this comma.

If `end_comma` is enabled, which always finalizes values with commas,
then this would append a second comma, which would transform the record
into two null values.

This patch prevents the redundant comma if end_commas are enabled.

Thanks to Paul Leopardi (@penguian) for reporting.
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.21%. Comparing base (778fb0c) to head (aba6aa6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #180   +/-   ##
=======================================
  Coverage   97.20%   97.21%           
=======================================
  Files           9        9           
  Lines        2147     2152    +5     
  Branches      358      358           
=======================================
+ Hits         2087     2092    +5     
  Misses         35       35           
  Partials       25       25           
Flag Coverage Δ
python2.7 96.68% <100.00%> (+<0.01%) ⬆️
python3.5 96.91% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marshallward marshallward changed the title Remove redunant commas of tail null values Remove redundant commas of tail null values Oct 4, 2025
@marshallward
Copy link
Copy Markdown
Owner Author

No update from @penguian but I assume this is working correctly.

@marshallward marshallward merged commit 88e547e into main Oct 7, 2025
58 checks passed
@penguian
Copy link
Copy Markdown

@marshallward See conda-forge/f90nml-feedstock#25 which has been awaiting review since 8 October.

@penguian
Copy link
Copy Markdown

f90nml v1.5 incorporating #180 is now available from conda-forge.
See https://anaconda.org/channels/conda-forge/packages/f90nml/overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants