Skip to content

Commit

Permalink
Update deprecated autoflake hook (#386)
Browse files Browse the repository at this point in the history
As stated in https://github.com/humitos/mirrors-autoflake/blob/master/README.md, DO NOT USE THIS REPOSITORY. There is an official version now at https://github.com/PyCQA/autoflake/blob/master/.pre-commit-hooks.yaml.

There are some errors when using this deprecated hook under Python 3.12,
such as

Traceback (most recent call last):
  File "/home/fanta/.cache/pre-commit/repoo2mq6vmn/py_env-python3.12/bin/autoflake", line 5, in <module>
    from autoflake import main
  File "/home/fanta/.cache/pre-commit/repoo2mq6vmn/py_env-python3.12/lib/python3.12/site-packages/autoflake.py", line 32, in <module>
    import distutils.sysconfig
ModuleNotFoundError: No module named 'distutils'
  • Loading branch information
FantasqueX committed Jul 23, 2024
1 parent 115aa12 commit 603970f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/humitos/mirrors-autoflake
rev: v1.1
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args: ["-i", "--remove-all-unused-imports"]
Expand Down

0 comments on commit 603970f

Please sign in to comment.