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

Failing pre-commit for version 15 #147

Open
MrGigSolutions opened this issue Feb 2, 2024 · 0 comments
Open

Failing pre-commit for version 15 #147

MrGigSolutions opened this issue Feb 2, 2024 · 0 comments
Labels

Comments

@MrGigSolutions
Copy link

Module

All modules

Describe the bug

Pre-commit fails on flake8 with the following error.

Traceback (most recent call last):
  File "/home/runner/.cache/pre-commit/repoavke92vx/py_env-python3/bin/flake8", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/runner/.cache/pre-commit/repoavke92vx/py_env-python3/lib/python3.12/site-packages/flake8/main/cli.py", line 22, in main
    app.run(argv)
  File "/home/runner/.cache/pre-commit/repoavke92vx/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 363, in run
    self._run(argv)
  File "/home/runner/.cache/pre-commit/repoavke92vx/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 350, in _run
    self.initialize(argv)
  File "/home/runner/.cache/pre-commit/repoavke92vx/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 330, in initialize
    self.find_plugins(config_finder)
  File "/home/runner/.cache/pre-commit/repoavke92vx/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 153, in find_plugins
    self.check_plugins = plugin_manager.Checkers(local_plugins.extension)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.cache/pre-commit/repoavke92vx/py_env-python3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 356, in __init__
    self.manager = PluginManager(
                   ^^^^^^^^^^^^^^
  File "/home/runner/.cache/pre-commit/repoavke92vx/py_env-python3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 238, in __init__
    self._load_entrypoint_plugins()
  File "/home/runner/.cache/pre-commit/repoavke92vx/py_env-python3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 254, in _load_entrypoint_plugins
    eps = importlib_metadata.entry_points().get(self.namespace, ())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'EntryPoints' object has no attribute 'get'

To Reproduce

Affected versions: 15.0

Steps to reproduce the behavior:

  1. Submit any pull request to the 15 branch.

Expected behavior
flake8 should not give this bug.

Additional context
Pre-commit seems to work with Python 3.12. I have had this give me problems in the past. Perhaps it should be working with 3.10 instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant