How can I document that a function returns a tuple
in such a way that PyCharm will be able to use it for type hinting?
Contrived example:
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.
I contacted PyCharm support, and this is what they said:
This is confirmed in PyCharm's documentation: