使用Python 2.7和PyCharm CE 2018.2.4,我有以下代码:
from datetime import datetime as dt
def updateGroupDynamicBenchmark(self, security, group, runTime):
"""
Update all the fields in a group from BPipe
:param security: Security to update
:type security: Common.secMasterRecords.SecMasterRecord
:param group: Group id to update
:type group: Common.secMasterFieldPolicyMgr.SecMasterFieldGroup
:param runTime: Running time for the update
:type runTime: datetime.datetime
:return: New expiry time
:rtype: datetime.datetime
"""
return dt.now()
此代码生成一条警告,出现在声明中的函数名称上:
函数定义缺少类型提示
该如何解决?非常感谢
答案 0 :(得分:0)
键入您的函数。
示例:
shouldComponentUpdate