Skip to content

try removing fix_#194

Open
james-bruten-mo wants to merge 4 commits intoMetOffice:mainfrom
james-bruten-mo:ruff_format_error
Open

try removing fix_#194
james-bruten-mo wants to merge 4 commits intoMetOffice:mainfrom
james-bruten-mo:ruff_format_error

Conversation

@james-bruten-mo
Copy link
Collaborator

@james-bruten-mo james-bruten-mo commented Feb 18, 2026

PR Summary

Sci/Tech Reviewer:
Code Reviewer: @yaswant

Update the superlinter action to remove the FIX_ lines as this stops the action from raising an error when asked to VALIDATE.
Related, run ruff format and fix some ruff linting errors

Code Quality Checklist

  • I have performed a self-review of my own code
  • My code follows the project's style guidelines
  • Comments have been included that aid understanding and enhance the readability of the code
  • My changes generate no new warnings
  • All automated checks in the CI pipeline have completed successfully

Testing

  • This change has been tested appropriately (please describe)

Security Considerations

  • I have reviewed my changes for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

AI Assistance and Attribution

  • Some of the content of this change has been produced with the assistance of Generative AI tool name (e.g., Met Office Github Copilot Enterprise, Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the Simulation Systems AI policy (including attribution labels)

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

(Please alert the code reviewer via a tag when you have approved the SR)

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Security considerations have been addressed
  • Performance impact is acceptable

@james-bruten-mo james-bruten-mo marked this pull request as ready for review February 18, 2026 16:53
Copy link
Collaborator

@yaswant yaswant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @james-bruten-mo
Can you check why some lines are formatted like best effort instead of sticking to 88 char rule?

A slight modification to linter rules (.github/linters/.ruff.toml) will flag this:

⚠️ However Ruff or Black will not automatically split a single long string literal into multiple lines. And this will require manual intervention. So, think whether we need to include Pycodestyle errors "E" or not.

Updated file

cache-dir = "/tmp/.ruff_cache"
line-length = 88
output-format = "grouped"

[lint]
# Ensure Pycodestyle errors (E) and Pyflakes errors (F) are reported.
# isort (I) is optional, but recommended for import sorting.
select = ["E", "F"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
ignore = ["F405"]  # undefined-local-with-import-star-usage

[format]
indent-style = "space"  # Like Black, indent with spaces, rather than tabs
quote-style = "double"
skip-magic-trailing-comma = false  # Like Black, respect magic trailing commas

Diff

index de9a835..c725e6f 100644
--- a/.github/linters/.ruff.toml
+++ b/.github/linters/.ruff.toml
@@ -2,14 +2,14 @@ cache-dir = "/tmp/.ruff_cache"
 line-length = 88
+output-format = "grouped"
 
 [lint]
+# Ensure Pycodestyle errors (E) and Pyflakes errors (F) are reported.
+# isort (I) is optional, but recommended for import sorting.
+select = ["E", "F"]
 # Allow unused variables when underscore-prefixed.
 dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
-# undefined-local-with-import-star-usage
-ignore = ["F405"]
+ignore = ["F405"]  # undefined-local-with-import-star-usage
 
 [format]
-# Like Black, indent with spaces, rather than tabs.
-indent-style = "space"
+indent-style = "space"  # Like Black, indent with spaces, rather than tabs
 quote-style = "double"
-# Like Black, respect magic trailing commas.
-skip-magic-trailing-comma = false
+skip-magic-trailing-comma = false  # Like Black, respect magic trailing commas

Then use the linter locally (no modification required for GitHub Action):

ruff check . --config .github/linters/.ruff.toml

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we eliminate the #noqa clutter by adding this to the bottom of the file? Probably require an __init__.py if not present already

__all__ = ["Path", "PurePath", "split", "nx", "os"]

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

Comments