diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c99ad5de..778fad79 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,6 +25,13 @@ repos: exclude: ^(cibuildwheel|unit_test|test)/ args: ["--py37-plus"] +# Autoremoves unused imports +- repo: https://github.com/hadialqattan/pycln + rev: v1.0.3 + hooks: + - id: pycln + args: [--config=pyproject.toml] + - repo: https://github.com/PyCQA/isort rev: 5.9.3 hooks: diff --git a/pyproject.toml b/pyproject.toml index 91d17547..60ca9618 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,3 +65,6 @@ module = [ "github", ] ignore_missing_imports = true + +[tool.pycln] +all = true