{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/6"}],"enrichment":{"capability":"Pytype is a static type checker that infers types in Python code without requiring annotations, flagging common mistakes like misspelled attributes and incorrect function calls across file boundaries.","skillfed_tags":["type-inference","static-analysis","linting"],"use_cases":["Type-check plain Python codebases that lack annotations to catch attribute errors and type mismatches early","Generate .pyi stub files for unannotated libraries to document inferred types and enable downstream type checking","Enforce type annotations where present while remaining permissive on unannotated code in mixed-annotation projects","Integrate type checking into CI/CD pipelines via GitHub Actions or similar to catch type errors before deployment","Migrate legacy Python code toward type safety by inferring types and gradually adding annotations"],"what_it_does":"Pytype is a static type analyzer that infers types across your Python codebase without requiring type annotations. Unlike gradual type checkers, it detects type errors in unannotated code by analyzing control flow and operations, catching issues like passing an integer to a function expecting a string. It can also enforce user-provided type annotations where present and generate standalone .pyi stub files with inferred type information.\n\nThe tool is designed to be lenient\u2014it allows operations that succeed at runtime and don't contradict annotations, rather than assigning fixed types at initialization. It runs on Python 3.10-3.12 and can analyze code targeting Python 3.8-3.12. Pytype is used at scale within Google and ships with helper tools like merge-pyi for integrating inferred types back into source files, plus configuration via pyproject.toml or setup.cfg.","worth_installing":"Yes, if you need type checking on unannotated Python code or want to infer types without strict gradual typing. The active maintenance, permissive license, and lack of known vulnerabilities support adoption. Medium install friction (13 dependencies, compiled packages) and platform constraints (Linux primary, macOS supported, Windows via WSL) are the main tradeoffs; evaluate whether your target Python versions (3.10+) and platform match your needs."},"id":"pytype","links":{"html":"https://skillfed.io/packages/pytype","md":"https://skillfed.io/packages/pytype.md","pypi":"https://pypi.org/project/pytype/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-10-11","license_spdx":null,"license_treatment":"permissive","name":"pytype","python_support":"supports_current","summary":"Python type inferencer"},"popularity":{"monthly_downloads":1013417,"position":4508,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2024.10.11"}
