Python 如何在Google docstring中指定参数类型?

Python 如何在Google docstring中指定参数类型?,python,import,python-import,Python,Import,Python Import,我应该如何在Google DocString中指定非内置类型的类型?例如,假设函数将tf.keras.models.Model作为参数。假设我从tf.keras导入模型导入了 我应该将docstring中的类型指定为 def myfunc(_模型): “呜呜呜呜 Args: _模型(models.model): """ 或 def myfunc(_模型): “呜呜呜呜 Args: _模型(tf.keras.models.model): """

我应该如何在Google DocString中指定非内置类型的类型?例如,假设函数将
tf.keras.models.Model
作为参数。假设我从tf.keras导入模型导入了

我应该将docstring中的类型指定为

def myfunc(_模型):
“呜呜呜呜
Args:
_模型(models.model):
"""

def myfunc(_模型):
“呜呜呜呜
Args:
_模型(tf.keras.models.model):
"""