相关疑难解决方法(0)

mypy 未检测到基本类型错误

使用 python 3.5.1。以及当前使用 git 安装的 mypy,mypy 标记错误 1 ​​和 2,但未报告 3

我做错了什么,或者这是一个错误,还是一个已知的问题?

import typing

def test_ordered_dict(od: typing.Dict[str,int]) -> typing.Dict[str,int]:
    return 1   #type error 1

a = test_ordered_dict(1)   #type error 2

def test_me():
    a = test_ordered_dict(1)  # type error 3 is not reported
Run Code Online (Sandbox Code Playgroud)

python static-typing mypy

6
推荐指数
1
解决办法
1425
查看次数

标签 统计

mypy ×1

python ×1

static-typing ×1