From 40d56b93182ff36b8a346ac9c3d6f0acef322c44 Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Fri, 9 Dec 2022 15:21:03 +0100
Subject: [PATCH] Move autoflake before pylint
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Otherwise pylint reports about non-used imports,
and then they get removed by autoflake
Then, you are confused, because they are no longer here
Let’s run the self-fixing before the report
---
 .pre-commit-config.yaml | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0d8179bc..fbf6e834 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,6 +10,17 @@ repos:
       - id: end-of-file-fixer
       - id: mixed-line-ending
       - id: trailing-whitespace
+-   repo: https://github.com/PyCQA/autoflake
+    rev: v1.7.7
+    hooks:
+    -   id: autoflake
+        args:
+        - --recursive
+        - --expand-star-imports
+        - --remove-all-unused-imports
+        - --remove-duplicate-keys
+        - --remove-unused-variables
+        - --in-place
 -   repo: https://github.com/psf/black
     rev: 22.10.0
     hooks:
@@ -51,14 +62,3 @@ repos:
     rev: 0.7.16
     hooks:
       - id: mdformat
--   repo: https://github.com/PyCQA/autoflake
-    rev: v1.7.7
-    hooks:
-    -   id: autoflake
-        args:
-        - --recursive
-        - --expand-star-imports
-        - --remove-all-unused-imports
-        - --remove-duplicate-keys
-        - --remove-unused-variables
-        - --in-place
-- 
GitLab