Legenda 或 mypy html 报告的文档?

Legenda or documentation for the mypy html report?

使用 --html-report 选项创建的 mypy html 报告显示了带有绿色、黄色和红色背景颜色的类型检查源代码。当鼠标悬停在黄线和红线上时,它还会显示工具提示,比如 "Any Types on this line: Unannotated (x1)"、"Any Types on this line: Explicit (x6) Unannotated (x2)" 和 "Any Types on this line: Omitted Generics (x3)".

是否有文档解释这一切的含义?我没能在 https://mypy.readthedocs.io/

找到它

您可以在下面查看有关相同内容的详细信息link

https://github.com/python/mypy/blob/56ed5c36c2320eff96077d77ae7115bef60233ea/test-data/unit/reports.test

未注释

def a(x) -> None:  # Unannotated
    any_f(x)

省略泛型

def b() -> List:  # Omitted Generics
    return [1, 2, 3]

基本上,类型以列表的形式给出,而不是列表中的元素类型

显式

def any_f(x: Any) -> None:  # Explicit
    pass

x: Any = 2  # Explicit

您明确表示类型是 Any

(x6)基本上是指实例数