Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deprecated autoflake hook #386

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

FantasqueX
Copy link
Contributor

@FantasqueX FantasqueX commented Jul 17, 2024

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'

What is the problem that this PR addresses?

...

How did you solve it?

...

Checklist

  • I have read the Contributor's Guide.
  • I will check that all automated PR checks pass before the PR gets reviewed.

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'
@kiancross kiancross merged commit 603970f into tmbo:master Jul 23, 2024
30 checks passed
@kiancross
Copy link
Collaborator

Thanks for the PR!

@FantasqueX FantasqueX deleted the update-autoflake-1 branch July 24, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants