{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/18"}],"enrichment":{"capability":"Automatically infers and adds type annotations to Python functions based on context clues like return statements, parameter defaults, and magic methods.","skillfed_tags":["type-hints","codemod","pre-commit"],"use_cases":["Add `-> None` annotations to functions that don't return anything, eliminating tedious manual work.","Annotate boolean, string, and numeric parameters based on their literal default values.","Bulk-annotate magic methods like `__init__`, `__str__`, and `__len__` with their standard return types.","Integrate into a pre-commit hook to enforce type annotations on every commit automatically.","Use as a libcst codemod in a larger refactoring pipeline to seed a codebase with starter annotations."],"what_it_does":"Autotyping is a command-line tool and libcst codemod that automatically adds type annotations to Python code where they are obvious from context. It uses heuristics to infer types from function bodies (e.g., functions with no return statement get `-> None`), parameter defaults (e.g., `flag=True` becomes `flag: bool`), and magic method signatures. It supports multiple invocation modes: direct CLI, pre-commit hooks, or as a libcst codemod.\n\nThe tool offers granular flags for different annotation strategies\u2014`--none-return`, `--bool-param`, `--scalar-return`, and others\u2014plus shortcut flags like `--safe` (conservative changes) and `--aggressive` (riskier inference). It can also integrate with pyanalyze's type suggestions. The documentation explicitly warns that heuristics may fail and that you should run a type checker afterward to verify correctness.","worth_installing":"Yes, with conditions. Install if you want to reduce boilerplate type annotation work and are willing to verify the results with a type checker. The low install friction and permissive license make it a low-risk experiment. However, the 690-day gap since the last release suggests limited active maintenance; use it as a helper tool rather than a critical part of your workflow, and always validate its output."},"id":"autotyping","links":{"html":"https://skillfed.io/packages/autotyping","md":"https://skillfed.io/packages/autotyping.md","pypi":"https://pypi.org/project/autotyping/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-09-23","license_spdx":null,"license_treatment":"permissive","name":"autotyping","python_support":"supports_current","summary":"A tool for autoadding simple type annotations."},"popularity":{"monthly_downloads":73704,"position":14945,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"24.9.0"}
