grapa.shared.string_manipulations.restructuredtext_to_text

grapa.shared.string_manipulations.restructuredtext_to_text(string: str, nparammax: int = -1) list

Converts a rest restructured text (e.g. docstring) into text, to be e.g. printed into the grapa console. NB: not a “clean” implementation.

Parameters:
  • string – e.g. a docstring

  • nparammax – only consider the first nparammax parameters of the docstring, the later ones are ignored

Returns:

a list of str (lines)