Sho*_*kit 12 python intellij-idea
在以下代码中:
from typing import List
def test() -> List[str]:
ret = ["Hi", "Hi"]
return ret
Run Code Online (Sandbox Code Playgroud)
我在函数定义行上收到以下警告:
Expected type 'Integral", got 'str' instead
Run Code Online (Sandbox Code Playgroud)
我看不出任何理由为什么IntelliJ-IDEA的python模块会将这个简单的函数解释为返回Integral而不是str的列表.这是一个类型检查错误吗?
| 归档时间: |
|
| 查看次数: |
1874 次 |
| 最近记录: |