JBKahn / flake8-print

flake8
MIT License
119 stars 22 forks source link

Release of pycodestyle 2.4.0 breaks flake8-print #33

Closed P4rk closed 2 years ago

P4rk commented 6 years ago

While running flake8 linter with flake8-print I get an error due to flake8-print bringing in version 2.4.0 of pycodestyle. Suggested PR to fix https://github.com/JBKahn/flake8-print/pull/32

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2416, in resolve
    return functools.reduce(getattr, self.attrs, module)
AttributeError: module 'pycodestyle' has no attribute 'break_around_binary_operator'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/flake8/plugins/manager.py", line 178, in load_plugin
    self._load(verify_requirements)
  File "/usr/local/lib/python3.6/site-packages/flake8/plugins/manager.py", line 150, in _load
    self._plugin = resolve()
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2418, in resolve
    raise ImportError(str(exc))
ImportError: module 'pycodestyle' has no attribute 'break_around_binary_operator'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/flake8/main/cli.py", line 16, in main
    app.run(argv)
  File "/usr/local/lib/python3.6/site-packages/flake8/main/application.py", line 396, in run
    self._run(argv)
  File "/usr/local/lib/python3.6/site-packages/flake8/main/application.py", line 383, in _run
    self.initialize(argv)
  File "/usr/local/lib/python3.6/site-packages/flake8/main/application.py", line 365, in initialize
    self.find_plugins()
  File "/usr/local/lib/python3.6/site-packages/flake8/main/application.py", line 191, in find_plugins
    self.check_plugins.load_plugins()
  File "/usr/local/lib/python3.6/site-packages/flake8/plugins/manager.py", line 423, in load_plugins
    plugins = list(self.manager.map(load_plugin))
  File "/usr/local/lib/python3.6/site-packages/flake8/plugins/manager.py", line 311, in map
    yield func(self.plugins[name], *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/flake8/plugins/manager.py", line 421, in load_plugin
    return plugin.load_plugin()
  File "/usr/local/lib/python3.6/site-packages/flake8/plugins/manager.py", line 186, in load_plugin
    raise failed_to_load
flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.break_around_binary_operator" due to module 'pycodestyle' has no attribute 'break_around_binary_operator'.
JBKahn commented 4 years ago

I don't typically pin dependancies of my dependancies, I rely on my dependancies to do that. Can you provide an example of how you got this error?