627 B
627 B
How to add a new node support to TraceCommentor
- Read about the target node information (https://docs.python.org/3/library/ast.html).
- Add a test case.
- Write the implementation and pass all tests.
- echo the original code. (automatically handled by the parent scope node if not in
flags.APPEND_SOURCE_BY_THEMSELVES) - expression should be evaluated and add comment to each recursively by correct order. (use
cmtor.eval(...)) - statements should be executed. (use
cmtor.exec(...)) - use
pytest -s -q -kto test new test case first, useDEBUGandPRINTenvironment variable to help debugging.
- echo the original code. (automatically handled by the parent scope node if not in