awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索Open-source alternativesSelf-hosted software博客网站地图
项目关于How we rank媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
awesome-repositories.com分类博客
python avatar

python/mypy

0
View on GitHub↗
www.mypy-lang.org↗

Mypy

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 persistence to accelerate subsequent builds. It also includes the ability to transform Python modules into C extensions using type hints to increase execution performance.

The analyzer covers broad capability areas including flow-sensitive type narrowing, match statement exhaustiveness verification, and the validation of variadic generics and typed dictionaries. It manages external dependencies through type stub validation and the analysis of untyped modules. The toolset also includes automated integration for continuous integration pipelines and recursive configuration file discovery.

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Features

  • Gradual Typing Systems - Provides a gradual typing system allowing type hints to be added incrementally while maintaining dynamic typing compatibility.
  • Automatic Type Deduction - Automatically determines variable and expression types to reduce the need for manual annotations.
  • External Library Definitions - Uses separate definition files to provide type information for libraries that do not have internal annotations.
  • Type Narrowing - Refines variable types based on conditional checks and type guards as the analyzer traverses the control flow.
  • Abstract Syntax Tree Parsers - Parses Python source code into an abstract syntax tree to extract semantic information for static analysis.
  • Python Type Checkers - A static analysis tool specifically designed to detect type errors and inconsistencies in Python source code.
  • Gradual Typing Adoption - Allows adding type hints to an existing Python codebase incrementally while maintaining compatibility with dynamic typing.
  • Type Inference Engines - Automatically determines variable types to reduce the requirement for manual annotations in Python.
  • Gradual Typing Frameworks - Provides a framework for adding type hints to Python codebases incrementally while maintaining compatibility with dynamic typing.
  • Static Code Analysis Tools - Scans source code to identify bugs and type inconsistencies before runtime execution.
  • Type Accuracy Validation - Validates that external type definition files accurately reflect the actual runtime behavior of the code.
  • Parallel Type Validation - Distributes code analysis across multiple worker processes to reduce the total time required for type validation.
  • TypedDict Validation - Checks for read-only items and flexible update operations within specialized dictionary type definitions.
  • Static Analysis Caches - Stores previously analyzed module states in binary format to avoid re-processing unchanged source files.
  • Analysis Result Caches - Stores intermediate analysis results in binary formats to avoid redundant processing of unchanged files.
  • Scale-Aware Analysis - Utilizes incremental checks and parallel analysis to manage type safety in extensive Python projects.
  • Incremental Type Validation - Provides background daemon support for fast, real-time type updates in large codebases.
  • Incremental Analysis Daemons - Maintains a long-running background process that keeps the codebase in memory for faster single-file updates.
  • Override Enforcement - Requires specific decorators on methods that override base class members to prevent accidental modifications.
  • Variadic Template Arguments - Verifies functions and classes that utilize a variable number of generic arguments.
  • Type-Based Contract Validation - Verifies that function signatures and complex generic types are used correctly across different modules.
  • Deprecation Management - Automatically issues warnings when the codebase utilizes features marked as outdated or deprecated.
  • Exhaustiveness Checkers - Generates errors when a match statement fails to cover all possible values of the subject type.
  • Parallel Processing Utilities - Distributes the type-checking workload across multiple worker processes to utilize multi-core CPUs.
  • Untyped Module Analysis - Performs forced analysis of imports from external libraries lacking formal type definitions.
  • Variable Usage Analysis - Identifies variables used before definition based on program control flow to prevent runtime errors.
  • Annotation Tools - Compiles statically typed Python modules into C extensions.
  • Code Analysis - Listed in the “Code Analysis” section of the Awesome Python awesome list.
  • 代码质量工具 - Optional static type checker for Python.
  • 开发者工具 - Static type checker.
  • Python Projects - Listed in the “Python Projects” section of the Awesome For Beginners awesome list.
  • Static Type Checkers - The standard static type checker implementing PEP 484.
  • Type Checkers - Standard static type checker for Python codebases.
  • Type Checking - Compile-time variable type checking.
20,489 星标·3,216 分支·Python·3 次浏览

Star 历史

python/mypy 的 Star 历史图表python/mypy 的 Star 历史图表

Mypy 的开源替代方案

相似的开源项目,按与 Mypy 的功能重合度排序。
  • google/pytypegoogle 的头像

    google/pytype

    5,037在 GitHub 上查看↗

    Pytype is a static code analysis tool and type inference engine for Python. It functions as a static type analyzer that detects type mismatches and verifies type annotations without requiring full manual hinting, while also serving as a type stub generator for producing standalone definition files. The project distinguishes itself by automatically determining variable and function types through an analysis of code patterns and assignments. This inference engine allows for structural code verification and the generation of type stubs that describe the interfaces of modules and functions. The

    Pythonlinterpythonstatic-analysis
    在 GitHub 上查看↗5,037
  • facebook/pyreflyfacebook 的头像

    facebook/pyrefly

    5,390在 GitHub 上查看↗

    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

    Rustcode-qualitycontributions-welcomegood-first-issue
    在 GitHub 上查看↗5,390
  • microsoft/pyrightmicrosoft 的头像

    microsoft/pyright

    15,241在 GitHub 上查看↗

    Pyright is a static type checker for Python designed to validate type hints and identify potential errors within large codebases. It functions as a command-line utility that integrates into local development environments and continuous integration pipelines to ensure code quality and consistency. The tool distinguishes itself through a high-performance analysis engine that utilizes incremental dependency graph analysis and persistent state caching to re-evaluate only the affected portions of a project. By implementing the Language Server Protocol, it provides real-time feedback, including err

    Python
    在 GitHub 上查看↗15,241
  • python/typeshedpython 的头像

    python/typeshed

    5,076在 GitHub 上查看↗

    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

    Pythonpythonstubtypes
    在 GitHub 上查看↗5,076
查看 Mypy 的所有 30 个替代方案→

Frequently asked questions

What does python/mypy do?

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.

What are the main features of python/mypy?

The main features of python/mypy are: Gradual Typing Systems, Automatic Type Deduction, External Library Definitions, Type Narrowing, Abstract Syntax Tree Parsers, Python Type Checkers, Gradual Typing Adoption, Type Inference Engines.

What are some open-source alternatives to python/mypy?

Open-source alternatives to python/mypy include: google/pytype — Pytype is a static code analysis tool and type inference engine for Python. It functions as a static type analyzer… facebook/pyrefly — Pyrefly is a static type checker for Python that operates as a language server, delivering real-time diagnostics,… microsoft/pyright — Pyright is a static type checker for Python designed to validate type hints and identify potential errors within large… python/typeshed — Typeshed is a collection of static type definitions and stubs for the Python standard library and third-party… astral-sh/ty — This project is a high-performance static type checker and comprehensive development toolkit for Python. It functions… facebook/pyre-check — Pyre is a high-performance static type checker and analysis tool for Python. It identifies type errors and ensures…