【发布时间】:2019-10-05 02:15:06
【问题描述】:
为什么pycharm会在此代码中的类或函数之外对None给出“预期类型”警告:
def blah():
hiya = None # type: dict # No type warning
class Foo:
bar = None # type: dict # No type warning
asf = None # type: dict # Expected type 'dict', got 'None' instead
【问题讨论】:
-
请用通用 [python] 标签标记所有 python 问题
标签: python python-3.x pycharm