Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
mypy 1.13.0+dev.8a8d58c8ce71cf4aa7a622681da888eeb514a8b3 文档
Logo
mypy 1.13.0+dev.8a8d58c8ce71cf4aa7a622681da888eeb514a8b3 文档

第一步

  • 入门
  • 类型提示备忘单
  • 在现有代码库中使用 mypy

类型系统参考

  • 内置类型(Built-in)
  • 类型推断和类型注解(annotations)
  • 类型的种类(kinds)
  • Class 基础(basics)
  • 运行时的注解问题(Annotation issues)
  • 协议(Protocol)与结构化子类型
  • 动态类型代码(Dynamically)
  • 类型缩小(narrowing)
  • 鸭子类型兼容性
  • 存根文件(Stub)
  • 泛型(Generics)
  • 更多类型
  • 字面量类型(Literal types)和枚举(Enums)
  • TypedDict
  • 最终名称, 方法和类(Final)
  • 元类(Metaclasses)

配置和运行 mypy

  • 运行 mypy 和管理导入(imports)
  • mypy命令行(command line)
  • mypy 配置文件(mypy configuration file)
  • 内联配置(Inline configuration)
  • Mypy 守护进程 (mypy 服务)
  • 使用已安装的包(Using installed packages)
  • 扩展和集成 mypy(Extending and integrating mypy)
  • 自动存根生成(Automatic stub generation) (stubgen)
  • 自动化存根测试(Automatic stub testing)(stubtest)

其他

  • 常见问题及解决方案(Common issues and solutions)
  • 支持的 Python 特性(Supported Python features)
  • 错误代码(Error codes)
  • 默认启用的错误代码(Error codes enabled by default)
  • 可选检查的错误代码(Error codes for optional checks)
  • 附加功能(Additional features)
  • 常见问题解答(Frequently Asked Questions)
  • Mypy 版本说明

项目链接

  • GitHub
  • Website
Back to top
Copyright © 2012-2022 Jukka Lehtosalo and mypy contributors
Made with Sphinx and @pradyunsg's Furo