orsinium-labs/infer-types

A CLI tool to automatically add type annotations into Python code. Must have tool for annotating existing code.

49
/ 100
Emerging

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.

Stale 6m
Maintenance 0 / 25
Adoption 15 / 25
Maturity 25 / 25
Community 9 / 25

How are scores calculated?

Stars

99

Forks

6

Language

Python

License

MIT

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.