I have a function that accepts only accepts some limited values for the input parameter provider
. Specifically, it only accepts the values provider_a
, provider_b
and provider_c
. What is the best way to document the possible values of this parameter in Python Docstring?
This is what I've tried so far:
def my_func(provider: str) -> str:
""" Sample function description goes here
:param str provider: Provider parameter that only accepts some possible values. Possible values:
- 'provider_a': Description of provider_a
- 'provider_b': Description of provider_b
- 'provider_c': Description of provider_c
:return: provider passed as input
:rtype: str
"""
# DO SOMETHING
return provider