tophat / codewatch

[deprecated] Monitor and manage deeply customizable metrics about your python code using ASTs
https://codewatch.io
Apache License 2.0
38 stars 3 forks source link

If you don't return node in your visit functions, there's no error or warning #25

Closed lime-green closed 5 years ago

lime-green commented 5 years ago

Maybe raise an error if the transformation doesn't return a node, or just return it explicitly from our NodeVisitor class

lime-green commented 5 years ago

This isn't an issue since astroid doesn't transform the node if it's None:

(https://github.com/PyCQA/astroid/blob/astroid-1.6.4/astroid/transforms.py#L39)