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

[FIX][15.0] branches Update flake8 autoflake #243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bosd
Copy link

@bosd bosd commented Jan 13, 2024

Fixes 15.0 branches:

As spotted in 15.0 branch of https://github.com/OCA/stock-logistics-warehouse/tree/15.0
job: https://github.com/OCA/stock-logistics-warehouse/actions/runs/6711504373/job/18239016420
CI on 15.0 PR are red.

autoflake

Traceback (most recent call last):
  File "/home/bosd/.cache/pre-commit/repop6v3fone/py_env-python3/bin/autoflake", line 5, in <module>
    from autoflake import main
  File "/home/bosd/.cache/pre-commit/repop6v3fone/py_env-python3/lib/python3.12/site-packages/autoflake.py", line 32, in <module>
    import distutils.sysconfig
ModuleNotFoundError: No module named 'distutils'

flake8

Traceback (most recent call last):
  File "/home/bosd/.cache/pre-commit/repo1vkztq8l/py_env-python3/bin/flake8", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/bosd/.cache/pre-commit/repo1vkztq8l/py_env-python3/lib/python3.12/site-packages/flake8/main/cli.py", line 22, in main
    app.run(argv)
  File "/home/bosd/.cache/pre-commit/repo1vkztq8l/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 363, in run
    self._run(argv)
  File "/home/bosd/.cache/pre-commit/repo1vkztq8l/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 350, in _run
    self.initialize(argv)
  File "/home/bosd/.cache/pre-commit/repo1vkztq8l/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 330, in initialize
    self.find_plugins(config_finder)
  File "/home/bosd/.cache/pre-commit/repo1vkztq8l/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/bosd/.cache/pre-commit/repo1vkztq8l/py_env-python3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 356, in __init__
    self.manager = PluginManager(
                   ^^^^^^^^^^^^^^
  File "/home/bosd/.cache/pre-commit/repo1vkztq8l/py_env-python3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 238, in __init__
    self._load_entrypoint_plugins()
  File "/home/bosd/.cache/pre-commit/repo1vkztq8l/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'


@pedrobaeza
Copy link
Member

Please put a link to a CI job with such problem.

@bosd
Copy link
Author

bosd commented Jan 13, 2024

Copy link
Member

@zamberjo zamberjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Pr fixes #257

Copy link

@Dranyel-Bosd Dranyel-Bosd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍♥️

@pedrobaeza
Copy link
Member

The referred PR was merged, so isn't this something specific on your side due to newer Python?

@OCA-git-bot
Copy link

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@bosd
Copy link
Author

bosd commented May 10, 2024

I assume you're referring to this:
In that pr I did a manual overwrite.

Repo template may need update as well. #243

Originally posted by @bosd in OCA/stock-logistics-warehouse#1913 (comment)

@zamberjo
Copy link
Member

This is unnecessary, updating maintainer-tools to f81a2cd8b3e7ba06d96a6fc8c944e6c7174faf7f will fix it:
OCA/maintainer-tools#618

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

Successfully merging this pull request may close these issues.

6 participants