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

Exception when using with flake8 v6.0.0 #191

Closed
shai-bennathan opened this issue Nov 24, 2022 · 2 comments
Closed

Exception when using with flake8 v6.0.0 #191

shai-bennathan opened this issue Nov 24, 2022 · 2 comments

Comments

@shai-bennathan
Copy link

Running 'flake8 --version' from command line.
When [flake8-import-order==1.18.1] + [flake8==6.0.0] is installed, the below exception is thrown.
When [flake8-import-order==1.18.1] + [flake8==5.0.4] is installed, the command succeeds.
When [flake8-import-order] is uninstalled, and [flake8==6.0.0] is installed, the command succeeds.

Other plugins are installed in all the above cases:
flake8-blind-except==0.2.1
flake8-builtins==2.0.1
flake8-docstrings==1.6.0
flake8-rst-docstrings==0.3.0
flake8-logging-format==0.9.0

With [flake8==6.0.0] installed, the issue reproduces for all flake8-import-order versions attempted:
1.18, 1.17, 1.15, 1.10

Environments:

  • Win11 22H2, Python3.10.7, PowerShell.
  • WinServer2019, Python 3.11, PowerShell.

Exception log:
(venv) PS C:\source\ait\pypekan> flake8 --version
Traceback (most recent call last):
File "C:\Users\shaib\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\shaib\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\source\ait\pypekan\venv\Scripts\flake8.exe_main
.py", line 7, in
File "C:\source\ait\pypekan\venv\lib\site-packages\flake8\main\cli.py", line 23, in main
app.run(argv)
File "C:\source\ait\pypekan\venv\lib\site-packages\flake8\main\application.py", line 198, in run
self._run(argv)
File "C:\source\ait\pypekan\venv\lib\site-packages\flake8\main\application.py", line 186, in _run
self.initialize(argv)
File "C:\source\ait\pypekan\venv\lib\site-packages\flake8\main\application.py", line 165, in initialize
self.plugins, self.options = parse_args(argv)
File "C:\source\ait\pypekan\venv\lib\site-packages\flake8\options\parse_args.py", line 51, in parse_args
option_manager.register_plugins(plugins)
File "C:\source\ait\pypekan\venv\lib\site-packages\flake8\options\manager.py", line 259, in register_plugins
add_options(self)
File "C:\source\ait\pypekan\venv\lib\site-packages\flake8_import_order\flake8_linter.py", line 43, in add_options
register_opt(
File "C:\source\ait\pypekan\venv\lib\site-packages\flake8_import_order\flake8_linter.py", line 90, in register_opt
parser.add_option(*args, **kwargs)
File "C:\source\ait\pypekan\venv\lib\site-packages\flake8\options\manager.py", line 281, in add_option
self._current_group.add_argument(*option_args, **option_kwargs)
File "C:\Users\shaib\AppData\Local\Programs\Python\Python310\lib\argparse.py", line 1428, in add_argument
raise ValueError('%r is not callable' % (type_func,))
ValueError: 'string' is not callable

@shai-bennathan
Copy link
Author

Duplicate of: #189

@sigmavirus24
Copy link
Member

Fix released @shai-bennathan

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

No branches or pull requests

2 participants