Look at flake8 B906
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 32
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
Flake8 flags some code with the B906 check:
B906: visit_ function with no further call to a visit function. This is often an error, and will stop the visitor from recursing into the subnodes of a visited node. Consider adding a call self.generic_visit(node) at the end of the function. Will only trigger on function names where the part after visit_ is a valid ast type with a non-empty _fields attribute. This is meant to be enabled by developers writing visitors using the ast module, such as flake8 plugin writers.
See
src/e3/sys.py:122:5: B906 `visit_` function with no further calls to a visit function, which might prevent the `ast` visitor from properly visiting all nodes. Consider adding a call to `self.generic_visit(node)`.
and
src/e3/sys.py:127:5: B906 `visit_` function with no further calls to a visit function, which might prevent the `ast` visitor from properly visiting all nodes. Consider adding a call to `self.generic_visit(node)`.
We need to review that warning to see whether that's a false positive or a real bug in e3.sys
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the visitor methods at src/e3/sys.py:122 and src/e3/sys.py:127, then read the surrounding ast visitor logic. Determine whether the B906 warnings indicate missed traversal or false positives, and document or fix the behavior accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100