mypy is a static type checker for Python that analyzes source code to detect type errors and inconsistencies without executing the program. It functions as a static analysis tool and type inference engine, providing a gradual typing system that allows type hints to be added to a codebase incrementally while maintaining compatibility with dynamic typing. The project distinguishes itself through a combination of performance and precision features. It utilizes a daemon-based incremental checking system and multi-process parallel analysis to manage large codebases, supported by binary cache persi
Pyrefly is a static type checker for Python that operates as a language server, delivering real-time diagnostics, completions, and navigation in any editor supporting the Language Server Protocol. It also performs static tensor shape analysis, using symbolic dimension variables and arithmetic to verify shape consistency in deep learning models without runtime execution. Beyond core type checking, Pyrefly supports gradual adoption workflows: it can generate a baseline of known errors so only new issues are reported, migrate configuration from other type checkers, and automatically suppress exi
Typeshed is a collection of static type definitions and stubs for the Python standard library and third-party packages. It serves as a standardized resource for static analyzers and integrated development environments to validate code correctness and provide type-based code completion without modifying the original source code of the libraries. The project focuses on the creation and maintenance of external type hint files that separate type annotations from runtime implementation. It utilizes a system for versioning and mapping these stubs to specific versions of runtime packages to maintain
MonkeyType is a runtime type inferencer and analysis tool for Python. It collects actual argument and return types from function calls during program execution to automate the production of static type annotations and compatible stub files. The system converts captured execution traces into static type hints, which can be inserted directly into source code function definitions or used to generate external type stubs. This process allows for the addition of type safety to existing codebases by analyzing real-world data types rather than through manual auditing. The tool's capabilities cover r
Pytype 是一个 Python 静态代码分析工具和类型推断引擎。它作为一个静态类型分析器,在无需完全手动标注的情况下检测类型不匹配并验证类型注解,同时还作为类型存根(stub)生成器,用于生产独立的定义文件。
The main features of google/pytype are: Automatic Type Inferences, Type Annotations, Argument Type Mismatch Detectors, Static Argument Validation, Type Stub Generators, Type Stub Files, Generic Types, Constraint-Based Inference.
Open-source alternatives to google/pytype include: python/mypy — mypy is a static type checker for Python that analyzes source code to detect type errors and inconsistencies without… facebook/pyrefly — Pyrefly is a static type checker for Python that operates as a language server, delivering real-time diagnostics,… python/typeshed — Typeshed is a collection of static type definitions and stubs for the Python standard library and third-party… instagram/monkeytype — MonkeyType is a runtime type inferencer and analysis tool for Python. It collects actual argument and return types… luals/lua-language-server — lua-language-server is a static analysis tool and type checker for the Lua language that implements the Language… microsoft/typescript-handbook — This project is a comprehensive guide and educational resource for the TypeScript language. It covers the fundamental…