RedHatQE / cloudwash

A cloud resources cleanup utility tool
Apache License 2.0
24 stars 29 forks source link

Update pre-commit hooks #115

Closed Gauravtalreja1 closed 1 year ago

Gauravtalreja1 commented 1 year ago

Older flake8 hook fails on latest Python 3.12, updating it solves the issue

flake8...................................................................Failed
- hook id: flake8
- exit code: 1

Traceback (most recent call last):
  File "/Users/username/.cache/pre-commit/repo6a3dbdvc/py_env-python3.12/bin/flake8", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/username/.cache/pre-commit/repo6a3dbdvc/py_env-python3.12/lib/python3.12/site-packages/flake8/main/cli.py", line 22, in main
    app.run(argv)
  File "/Users/username/.cache/pre-commit/repo6a3dbdvc/py_env-python3.12/lib/python3.12/site-packages/flake8/main/application.py", line 363, in run
    self._run(argv)
  File "/Users/username/.cache/pre-commit/repo6a3dbdvc/py_env-python3.12/lib/python3.12/site-packages/flake8/main/application.py", line 350, in _run
    self.initialize(argv)
  File "/Users/username/.cache/pre-commit/repo6a3dbdvc/py_env-python3.12/lib/python3.12/site-packages/flake8/main/application.py", line 330, in initialize
    self.find_plugins(config_finder)
  File "/Users/username/.cache/pre-commit/repo6a3dbdvc/py_env-python3.12/lib/python3.12/site-packages/flake8/main/application.py", line 153, in find_plugins
    self.check_plugins = plugin_manager.Checkers(local_plugins.extension)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/.cache/pre-commit/repo6a3dbdvc/py_env-python3.12/lib/python3.12/site-packages/flake8/plugins/manager.py", line 356, in __init__
    self.manager = PluginManager(
                   ^^^^^^^^^^^^^^
  File "/Users/username/.cache/pre-commit/repo6a3dbdvc/py_env-python3.12/lib/python3.12/site-packages/flake8/plugins/manager.py", line 238, in __init__
    self._load_entrypoint_plugins()
  File "/Users/username/.cache/pre-commit/repo6a3dbdvc/py_env-python3.12/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'
Gauravtalreja1 commented 1 year ago

cc: @jyejare @mshriver @omkarkhatavkar @ntkathole