You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the latest version from bandit (in our case in pre-commit with flake8-bandit) fails as of today with the following traceback:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flake8/checker.py", line 687, in _run_checks
return checker.run_checks()
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flakehell/_patched/_checkers.py", line 282, in run_checks
return super().run_checks()
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flake8/checker.py", line 597, in run_checks
self.run_ast_checks()
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flake8/checker.py", line 500, in run_ast_checks
for (line_number, offset, text, _) in runner:
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flake8_bandit.py", line 85, in run
for warn in self._check_source():
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flake8_bandit.py", line 59, in _check_source
bnv = BanditNodeVisitor(
TypeError: BanditNodeVisitor.__init__() missing 1 required positional argument: 'metrics'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/bin/flakehell", line 8, in <module>
sys.exit(entrypoint())
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flakehell/_cli.py", line 40, in entrypoint
exit_code, msg = main(argv)
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flakehell/_cli.py", line 32, in main
return COMMANDS[command_name](argv=argv[1:])
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flakehell/commands/_lint.py", line 12, in lint_command
app.run(argv)
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flake8/main/application.py", line 375, in run
self._run(argv)
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flake8/main/application.py", line 364, in _run
self.run_checks()
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flake8/main/application.py", line 271, in run_checks
self.file_checker_manager.run()
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flake8/checker.py", line 309, in run
self.run_parallel()
File "/root/.cache/pre-commit/repohnaochc9/py_env-python3/lib/python3.10/site-packages/flake8/checker.py", line 275, in run_parallel
for ret in pool_map:
File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 448, in <genexpr>
return (item for chunk in result for item in chunk)
File "/usr/local/lib/python3.10/multiprocessing/pool.py", line 870, in next
raise value
TypeError: BanditNodeVisitor.__init__() missing 1 required positional argument: 'metrics'
flake8-bandit hasn't been updated recently.
Reproduction steps
I sadly wasn't able to produce a MWE. Here's our relevant pre-commit config though:
Describe the bug
Using the latest version from bandit (in our case in pre-commit with flake8-bandit) fails as of today with the following traceback:
flake8-bandit
hasn't been updated recently.Reproduction steps
I sadly wasn't able to produce a MWE. Here's our relevant pre-commit config though:
Expected behavior
The exception isn't raised and the check doesn't fail.
Bandit version
1.7.3 (latest on PyPI)
Python version
3.10 (Default)
Additional context
The text was updated successfully, but these errors were encountered: