A pre-commit hook for Fortitude.
Distributed as a standalone repository to enable installing Fortitude via prebuilt wheels from PyPI.
To run Fortitude via pre-commit, add the
following to your .pre-commit-config.yaml
:
repos:
- repo: https://github.com/PlasmaFAIR/fortitude-pre-commit
# Fortitude version.
rev: v0.7.4
hooks:
- id: fortitude
Extra arguments may be provided to the lint hook:
repos:
- repo: https://github.com/PlasmaFAIR/fortitude-pre-commit
# Fortitude version.
rev: v0.7.4
hooks:
- id: fortitude
args: ["--fix", "--unsafe-fixes", "--preview"]
When running with --fix
, Fortitude's lint hook should be placed before any code
formatters in use.
Note that Fortitude will run with the option --force-exclude
switched on by default.
This will prevent Fortitude from checking files that have been explicitly added to your
exclude list in fpm.toml
or fortitude.toml
.
This repository in based on ruff-pre-commit, which is licensed under either of:
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
It is additionally licensed under the MIT license for the PlasmaFAIR project.