我如何记录函数返回的tuple方式,使PyCharm能够将其用于类型提示?
举例:
def fetch_abbrev_customer_info(customer_id):
"""Pulls abbreviated customer data from the database for the Customer
with the specified PK value.
:type customer_id:int The ID of the Customer record to fetch.
:rtype:???
"""
... magic happens here ...
return customer_obj.fullname, customer_obj.status #, etc.
Run Code Online (Sandbox Code Playgroud)