diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..7c99e1c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,23 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-added-large-files + - id: check-yaml + - id: check-merge-conflict + + - repo: local + hooks: + - id: ruff + name: lint with ruff + language: system + entry: ruff check --force-exclude + types: [python] + require_serial: true + + - id: ruff-format + name: format with ruff + language: system + entry: ruff format --force-exclude + types: [python] + require_serial: true \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt index 27386d6..4a624fa 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,4 +10,6 @@ numpydoc pytest sphinx sphinx_rtd_theme -area_detector_handlers \ No newline at end of file +area_detector_handlers +pre-commit +ruff \ No newline at end of file