Open ericwb opened 6 months ago
Thanks for the report! This is definitely not by design. Happy to review a PR if you take the time to tackle this.
Looks like this isn't occurring on Bandit source code, but one of its dependencies in the .tox directory.
Narrowing it down some, it occurs here:
vulture .tox/py312/lib/python3.12/site-packages/astroid
More specifically, it's this file:
vulture bandit/.tox/py312/lib/python3.12/site-packages/astroid/tests/testdata/python3/data/joined_strings.py
Here's a reference issue in astroid. So this might be an extreme edge case that doesn't need fixing. However, it would be nice if the RecursionError was caught and handled gracefully in vulture.
Thanks for looking into this! Can you make a pull request along those lines?
I tested out vulture on a project I maintain (Bandit). Unfortunately, the first result I got was a RecursionError. It's not clear to me if this is by-design or an edge case bug. Bandit itself does static analysis using an AST and vulture seems to trip up when inspecting the visitor logic.
To reproduce: