Skip to content

Commit

Permalink
Merge pull request #125 from casperdcl/patch-1
Browse files Browse the repository at this point in the history
fix parse_options bug
  • Loading branch information
gforcada committed Nov 19, 2022
2 parents f5f634f + fb00a24 commit ef6b0d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flake8_isort.py
Expand Up @@ -24,7 +24,7 @@ def __init__(self, tree, filename, lines):
self.filename = filename
self.lines = lines

def add_options(option_manager):
def add_options(self, option_manager):
option_manager.add_option(
'--isort-show-traceback',
action='store_true',
Expand Down

1 comment on commit ef6b0d8

@balgillo
Copy link

Choose a reason for hiding this comment

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

This breaks flake8 5.0.4.

flake8 --help
Traceback (most recent call last):
  File "/home/developer/.local/bin/flake8", line 8, in <module>
    sys.exit(main())
  File "/home/developer/.local/lib/python3.8/site-packages/flake8/main/cli.py", line 22, in main
    app.run(argv)
  File "/home/developer/.local/lib/python3.8/site-packages/flake8/main/application.py", line 336, in run
    self._run(argv)
  File "/home/developer/.local/lib/python3.8/site-packages/flake8/main/application.py", line 324, in _run
    self.initialize(argv)
  File "/home/developer/.local/lib/python3.8/site-packages/flake8/main/application.py", line 308, in initialize
    self.register_plugin_options()
  File "/home/developer/.local/lib/python3.8/site-packages/flake8/main/application.py", line 140, in register_plugin_options
    self.option_manager.register_plugins(self.plugins)
  File "/home/developer/.local/lib/python3.8/site-packages/flake8/options/manager.py", line 376, in register_plugins
    add_options(self)
TypeError: add_options() missing 1 required positional argument: 'option_manager'

This is fixed by downgrading pip install flake8-isort==5.0.1

Please sign in to comment.