From 1093659e1efaea7c2be5da168f15ab2dc112ac68 Mon Sep 17 00:00:00 2001 From: Issac Besso Date: Sun, 1 Aug 2021 11:52:45 +0300 Subject: [PATCH] introduce autoflake autoflake complements flake8 for removing unused imports because flake8 just reports them and fails the pre-commit followed this reference to integrate via pre-commit: https://github.com/myint/autoflake/pull/62 --- .pre-commit-config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6658265c55..38d94c584f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,6 +2,15 @@ default_language_version: python: python3 repos: + - repo: https://github.com/myint/autoflake + rev: "v1.4" + hooks: + - id: autoflake + args: + - --in-place + - --remove-unused-variables + - --remove-all-unused-imports + - repo: https://github.com/hadialqattan/pycln rev: "0.0.1-beta.1" hooks: