This directory contains miscellaneous code that is imported from different parts of the codebase.
ast_helper.py contains
- generate_ast to read any file and generate an AST from it, this is called from __main__.py and stmt_visitor.py when importing a module.
- get_call_names used in vars_visitor.py when visiting a Subscript, and framework_helper.py on function decorators in is_flask_route_function
- get_call_names_as_string used in expr_visitor.py to create ret_function_name as RHS and yld_function_name as LHS, and in stmt_visitor.py when connecting a function to a loop.
- Arguments used in expr_visitor.py when processing the arguments of a user defined function and framework_adaptor.py to taint function definition arguments.
module_definitions.py contains classes created mostly in stmt_visitor.py
- `project_definitions`_ is a global dictionary modifed in the `append_if_local_or_in_imports`_ method of `ModuleDefinitions`_, read in framework_adaptor.py to obtain all function nodes.
- `ModuleDefinition`_ is created to keep track of parent definitions when visiting functions, classes and __init__.py files in stmt_visitor.py
- `LocalModuleDefinition`_ is created when visiting functions and classes in stmt_visitor.py
- `ModuleDefinitions`_ contains `append_if_local_or_in_imports`_ which is used in when adding a function or class to the module definitions in
node_types.py contains all the different node types created in expr_visitor.py and stmt_visitor.py
project_handler.py contains TODO