From 5e57380194970d97003f6126727d52b47491c366 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Sun, 10 Sep 2023 10:52:25 -0500 Subject: [PATCH] Introduce a pre-commit config to auto-fix linting issues --- .pre-commit-config.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..fb55eb1 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,33 @@ +# Run `pre-commit autoupdate` to update tool versions. +# Note that pre-commit.ci can update hook versions automatically. + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks.git + rev: v4.4.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: mixed-line-ending + - id: trailing-whitespace + + - repo: https://github.com/asottile/pyupgrade + rev: v3.10.1 + hooks: + - id: pyupgrade + name: "Enforce Python 3.6 idioms" + args: [--py36-plus] + + - repo: https://github.com/psf/black + rev: 23.9.0 + hooks: + - id: black + + - repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort + + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python + rev: 2.7.2 + hooks: + - id: editorconfig-checker