summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Barnett <jason.w.barnett@gmail.com>2022-12-27 13:15:28 -0500
committerGitHub <noreply@github.com>2022-12-28 00:15:28 +0600
commit6593a2d7eada38ea4ae624caf945fc55a6e4939f (patch)
treef5b2c6935ea8a41f1841a967794ecae1fa0ebe84
parent4fac6bc84c1374e5cde8cfd2125f214d1830b5f4 (diff)
downloadkombu-6593a2d7eada38ea4ae624caf945fc55a6e4939f.tar.gz
add autoflake to .pre-commit-config.yaml to automatically remove unused imports (#1637)
* add autoflake to .pre-commit-config.yaml to automatically remove unused imports * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-rw-r--r--.pre-commit-config.yaml6
-rw-r--r--kombu/utils/text.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index b928a4b0..c4b21f44 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -5,6 +5,12 @@ repos:
- id: pyupgrade
args: ["--py37-plus"]
+ - repo: https://github.com/PyCQA/autoflake
+ rev: v2.0.0
+ hooks:
+ - id: autoflake
+ args: ["--in-place", "--ignore-pass-after-docstring", "--imports"]
+
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
diff --git a/kombu/utils/text.py b/kombu/utils/text.py
index db260b52..fea53347 100644
--- a/kombu/utils/text.py
+++ b/kombu/utils/text.py
@@ -5,7 +5,7 @@
from __future__ import annotations
from difflib import SequenceMatcher
-from typing import Iterable, Iterator, Optional, Tuple, Union
+from typing import Iterable, Iterator
from kombu import version_info_t