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

Look at flake8 B906 #552

Open
enzbang opened this issue Jan 16, 2023 · 0 comments
Open

Look at flake8 B906 #552

enzbang opened this issue Jan 16, 2023 · 0 comments
Labels
good first issue Small task that can be performed by new or casual contributors

Comments

@enzbang
Copy link
Member

enzbang commented Jan 16, 2023

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

@enzbang enzbang added the good first issue Small task that can be performed by new or casual contributors label Jan 16, 2023
enzbang added a commit to enzbang/e3-core that referenced this issue Jan 16, 2023
Nikokrock pushed a commit to Nikokrock/e3-core that referenced this issue Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Small task that can be performed by new or casual contributors
Projects
None yet
Development

No branches or pull requests

1 participant