Conversation
There was a problem hiding this comment.
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:
"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 commasDiff
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 commasThen use the linter locally (no modification required for GitHub Action):
ruff check . --config .github/linters/.ruff.toml
There was a problem hiding this comment.
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"]
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
Testing
Security Considerations
AI Assistance and Attribution
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review