Skip to content

Conversation

@yaswant
Copy link
Collaborator

@yaswant yaswant commented Jan 12, 2026

Description

Summary

Bump superlinter

Changes

  • Upgrade SuperLinter action to v8.3.2
  • Update Python environment matrix
  • Prefer ruff over Black

Dependency

List dependent changes. Can use build-group logic here.

Impact

Discuss any potential impacts this feature may have on existing functionalities.

Checklist

  • I have performed a self-review of my own changes

@yaswant yaswant self-assigned this Jan 13, 2026
@yaswant yaswant added the CI label Jan 13, 2026
Copy link
Collaborator

@james-bruten-mo james-bruten-mo left a comment

Choose a reason for hiding this comment

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

Can we keep the name Lint please, otherwise fine, except for a few extra ruff failures in the CI

jobs:
check:
name: Lint
name: Validate
Copy link
Collaborator

Choose a reason for hiding this comment

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

This isn't validating - let's stick with Lint

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Few things needed addressing:

  1. What do you want to do with
F841 Local variable `raw_code` is assigned to but never used
     --> umdp3_fixer/whitespace.py:261:13
      |
  259 |     try:
  260 |         with open(filename) as fortran_file:
  261 |             raw_code = fortran_file.readlines()
      |             ^^^^^^^^
  262 |     except EnvironmentError:
  263 |         print(

can you see where raw_code is used?

  1. We need to tidy the code base addressing "undefined-local-with-import-star": F504 (ignored in ruff config) and F403 (ignored in code with #noqa) in a separate PR or wait until Multi-file analysis astral-sh/ruff#7447 is available upstream.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks
I think 1 can just be deleted - all the code for the umdp3 scripts is in SimSys_Scripts and a grep of raw_code only returns that one example.
The import with * needs to stay in the upgrade macro files as this is the recommended way of importing macros. It's just one we'll need to ignore

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for clarifying that. Yes, we leave star imports, but will keep an eye on ruff#7447.

Copy link
Collaborator

@james-bruten-mo james-bruten-mo left a comment

Choose a reason for hiding this comment

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

Thanks, looks good now

@james-bruten-mo james-bruten-mo merged commit eb5ff59 into MetOffice:main Jan 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants