Skip to content

Conversation

@Iximiel
Copy link
Member

@Iximiel Iximiel commented Oct 30, 2025

Hi @gtribello, look if you like this:

I added a formatter and a static check that helps in looking for errors (such as unused variables/imports, wrong variables hidden in raised exceptions, it seems to dislike using 'l' as variable since it is similar to 'I', and so on)
This should help in tracking future merges/changes like we do with astyle and codecheck in plumed

I chose to use and indent of 2 spaces, but this is an opinionated choice of mine, I can change it

To format things on your pc you simply need to run tox in the home directory of the project:
it will

  • format
  • check for some python errors
  • run the test locally
    in this order

to run the check alone you can run ruff format (or tox -e format), ruff check (or tox -e linting)

The CI will softly enforce the check and the formatting, but with no interference in the the old tests

@Iximiel Iximiel changed the title Adding a formatter/check like astyle Adding a formatter/check like astyle/codecheck Oct 30, 2025
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.

1 participant