securesauce/precli

No handling of node type future_import_statement

Closed this issue · 1 comments

Describe the bug
A future import could be used. Currently it would get ignored as unhandled node type.

To Reproduce
Steps to reproduce the behavior:

  1. Create test with future_import_statement
  2. Run precli and verify no import in symbol table

Expected behavior
Need a new visit_future_import_statement() function in the parser.

Version

3.4

Additional context
https://github.com/tree-sitter/tree-sitter-python/blob/master/src/grammar.json

The only feature that requires using the future statement is annotations (see PEP 563). Therefore, no value in adding this to precli

https://docs.python.org/3/library/__future__.html