orsinium-labs/infer-types
A CLI tool to automatically add type annotations into Python code. Must have tool for annotating existing code.
Leverages the `astypes` library for sophisticated type inference heuristics, including pattern-matching on function names (e.g., `is_*` → `bool`), inheritance chain analysis, and cross-referencing typeshed for third-party library types. Performs purely static analysis without code execution, emitting Python 3.10+ union syntax (`str | None`) while remaining compatible with older versions via `__future__` imports. Integrates seamlessly with isort for import organization and supports selective heuristic application through CLI flags.
No commits in the last 6 months. Available on PyPI.
Stars
99
Forks
6
Language
Python
License
MIT
Category
Last pushed
Mar 17, 2023
Monthly downloads
497
Commits (30d)
0
Dependencies
3
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ai-coding/orsinium-labs/infer-types"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
inducer/cgen
C/C++ source generation from an AST
westandskif/convtools
convtools is a specialized Python library for dynamic, declarative data transformations with...
pyecore/pyecore
A Python(nic) Implementation of EMF/Ecore (Eclipse Modeling Framework)
mutating/transfunctions
Say NO to Python fragmentation on sync and async
cogu/cfile
A python C code generator