diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..7579ab7a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.6.4 + hooks: + # Run the linter. + - id: ruff + args: [ --fix ] + # Run the formatter. + - id: ruff-format \ No newline at end of file diff --git a/requirements/environment.yml b/requirements/environment.yml index 6b8cc2b9..8569f6c9 100644 --- a/requirements/environment.yml +++ b/requirements/environment.yml @@ -6,3 +6,4 @@ dependencies: - pytest-cov - pytest-qt - qtpy +- pre-commit