Skip to content

Commit

Permalink
introduce autoflake
Browse files Browse the repository at this point in the history
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:
PyCQA/autoflake#62
  • Loading branch information
ibesso-rh committed Aug 1, 2021
1 parent 2d4e5cd commit 1093659
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1093659

Please sign in to comment.