Tim*_*son 6 python static-typing 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)
归档时间: |
|
查看次数: |
1425 次 |
最近记录: |