From e2652daf73b01d705e64d47fb4040e334508274e Mon Sep 17 00:00:00 2001 From: chillaranand Date: Fri, 13 May 2022 15:24:58 +0530 Subject: [PATCH] chore: Added flake8 to pre-commit config --- .github/helper/flake8.conf | 76 ++++++++++++++++++++++++++++++++++++++ .pre-commit-config.yaml | 10 +++++ 2 files changed, 86 insertions(+) create mode 100644 .github/helper/flake8.conf diff --git a/.github/helper/flake8.conf b/.github/helper/flake8.conf new file mode 100644 index 0000000000..a7f1f70da3 --- /dev/null +++ b/.github/helper/flake8.conf @@ -0,0 +1,76 @@ +[flake8] +ignore = + B001, + B007, + B009, + B010, + B950, + E101, + E111, + E114, + E116, + E117, + E121, + E122, + E123, + E124, + E125, + E126, + E127, + E128, + E131, + E201, + E202, + E203, + E211, + E221, + E222, + E223, + E224, + E225, + E226, + E228, + E231, + E241, + E242, + E251, + E261, + E262, + E265, + E266, + E271, + E272, + E273, + E274, + E301, + E302, + E303, + E305, + E306, + E402, + E501, + E502, + E701, + E702, + E703, + E741, + F401, + F403, + F405, + W191, + W291, + W292, + W293, + W391, + W503, + W504, + E711, + E129, + F841, + E713, + E712, + E722, + + +max-line-length = 200 +exclude=.github/helper/semgrep_rules,test_*.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b39f1ca85d..39646f824d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,6 +22,16 @@ repos: - id: black additional_dependencies: ['click==8.0.4'] + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.9.2 + hooks: + - id: flake8 + additional_dependencies: [ + 'flake8-bugbear', + ] + args: ['--config', '.github/helper/flake8.conf'] + exclude: ".*setup.py$" + - repo: https://github.com/timothycrosley/isort rev: 5.9.1 hooks: