Skip to content

Update pre-commit and gitlab CI configs and fix formatting and linting issues

This MR configures black to run using pre-commit, adds linting (using ruff), and some smaller similar formatting improvements (EOF fixer and trailing whitespace remover).

It also addresses most of the formatting and linting issues detected. There are a few that I ignore since you potentially have some work in progress - these concern broken functions that I presume never are called.


To run locally, install pre-commit (probably using pip: pip install pre-commit) and execute (pre-commit run -a). You can also install the hook locally on any repositories where you want pre-commit to ensure passing pipelines before allowing you to commit (annoying but good) by running pre-commit install from your local repo folder.

Edited by Anders Lindh Olsson

Merge request reports

Loading