Here's a working example with type hinting where I can annotate the parameter that it takes an int and a string and returns a boolean:
from typing import Callable
def func(another_func: Callable[[int, str], bool]):
pass
The relevant part is -> bool
in the picture above. I'm trying to do the same thing with a reStructuredText docstring:
def func2(another_func):
""" :param function[int, str] another_func: """
This is the closest I've gotten in the picture above. Writing function[[int, str], bool]
doesn't work
Change it to just like how PyCharm showed you how it looks like when using typing.Callable
:
""" :param (int, str) -> bool another_func: """