Automate python type hints for params and return values
git clone https://github.com/Donny-GUI/Tara.git
cd Tara
python main.py <yourfile>
git clone https://github.com/Donny-GUI/Tara.git
cd Tara
python3 main.py <yourfile>
Parameters use a mix of symbolic execution, natural language processing and static analysis. Then finally a large language model to find a reasonable type if none is assigned.
For Return Types
- Determine if the function has a return ast
- Find those statements that push return
- Check if it has a type hint or type annotation
- Analyize the literal string of the return value for lexigraphical hints
- if no result, use language syntax to infer type.
- Reanalyze to make sure the type or types makes sense
- Secondary Types - Genrators/iters, slices, Callable, Array, etc
- Standard Library Types - Index the standard library return types and objects. build a map to function -> return object