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
Copy file name to clipboardExpand all lines: README.rst
+9
Original file line number
Diff line number
Diff line change
@@ -205,6 +205,10 @@ to raise a ``ValueError`` if the arguments are exhausted at differing lengths. T
205
205
was added in Python 3.10, so don't enable this flag for code that should work on <3.10.
206
206
For more information: https://peps.python.org/pep-0618/
207
207
208
+
**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.
209
+
Will only trigger on function names where the part after ``visit_`` is a valid ``ast`` type with a non-empty ``_fields`` attribute.
210
+
This is meant to be enabled by developers writing visitors using the ``ast`` module, such as flake8 plugin writers.
211
+
208
212
**B950**: Line too long. This is a pragmatic equivalent of
209
213
``pycodestyle``'s ``E501``: it considers "max-line-length" but only triggers
210
214
when the value has been exceeded by **more than 10%**. You will no
@@ -302,6 +306,11 @@ MIT
302
306
Change Log
303
307
----------
304
308
309
+
Future
310
+
~~~~~~~~~
311
+
312
+
* Add B906: ``visit_`` function with no further calls to a ``visit`` function. (#313)
0 commit comments