I have a function with a long signature with type hint, like
def set_parameters(
tokenizer: Union[None, "Tokenizer", str] = None,
vocab: Optional["Vocab"] = None,
vocab_from: Optional[Dict[str, str]] = None,
max_sent_length: Optional[int] = None,
max_turn_length: Optional[int] = None,
convert_to_lower_letter: Optional[bool] = None,
weak=False) -> "FieldContext":
I use Sphinx autodoc to generate docstring.
.. autofunction:: set_parameters
Then, Sphinx will ignore the line break and describe the function in one line.
set_parameters(tokenizer: Union[None, Tokenizer, str] = None, vocab: Optional[Vocab] = None, vocab_from: Optional[Dict[str, str]] = None, max_sent_length: Optional[int] = None, max_turn_length: Optional[int] = None, convert_to_lower_letter: Optional[bool] = None, weak=False) -> FieldContext:
It's very ugly and hard to read. What I want is either it follows the line breaks in my code or do some line breaks itself automatically. Is there any way to realize?