From 66a2e68e7e2e319003be05c8a4d4e00542e8d495 Mon Sep 17 00:00:00 2001 From: Simon Brugman Date: Fri, 27 Jan 2023 11:06:36 +0100 Subject: [PATCH 1/2] ci: setup pre-commit --- .pre-commit-config.yaml | 23 +++++++++++++++++++++++ README.md | 12 ++++++++++++ 2 files changed, 35 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..122917d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,23 @@ +repos: + - repo: https://github.com/PyCQA/flake8 + rev: 6.0.0 + hooks: + - id: flake8 + additional_dependencies: + - flake8-executable==2.1.3 + - bandit==1.7.4 + - flake8-bugbear==21.11.29 + - flake8-comprehensions==3.10.1 + args: [ "--max-line-length", "120" ] + exclude: "tests/to-be-tested/" + - repo: https://github.com/pre-commit/mirrors-mypy + rev: 'v0.991' + hooks: + - id: mypy + files: ^flake8_executable + exclude: "tests/" + - repo: https://github.com/asottile/yesqa + rev: v1.4.0 + hooks: + - id: yesqa + exclude: "tests/to-be-tested/" diff --git a/README.md b/README.md index 2b1f1d5..4b24aac 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,18 @@ Run: pip install flake8-executable +Or through `pre-commit` with the `.pre-commit-config.yaml`: + +```yaml +repos: +- repo: https://github.com/PyCQA/flake8 + rev: 6.0.0 # replace with the latest flake8 release + hooks: + - id: flake8 + additional_dependencies: + - flake8-executable +``` + ## Usage Normally, after flake8-executable is installed, invoking flake8 will also run this plugin. For more From 99748d287865bf2928013be09679f9322079f460 Mon Sep 17 00:00:00 2001 From: Simon Brugman Date: Tue, 24 Jan 2023 15:52:57 +0100 Subject: [PATCH 2/2] ci: update renovate --- .github/renovate.json5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 1c5aff8..cb707ed 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -26,6 +26,10 @@ "fileMatch": ["requirements.*\.txt$"] }, + "pre-commit": { + "enabled": true + }, + "labels": [ "renovate" ],