Always include default parameter values in Python autodoc strings
One of side effects of 15b369028f was that
the default values were only included in Python doc strings if we could
be sure that they could be interpreted as valid Python expressions, but
this change was actually undesirable as it may be useful to see C++
expression for the default value in the doc string even when it isn't
valid in Python.
Undo this part of the change and extend autodoc unit test to check that
this stays fixed.
Closes #1271.
This commit is contained in:
parent
5c21de71c7
commit
1e22e791ef
3 changed files with 24 additions and 2 deletions
|
|
@ -207,3 +207,5 @@ check(inspect.getdoc(process), "process(int _from, int _in, int var) -> int")
|
|||
check(inspect.getdoc(process2), "process2(int _from=0, int _in=1, int var=2) -> int")
|
||||
check(inspect.getdoc(process3), "process3(int _from, int _in, int var) -> int")
|
||||
check(inspect.getdoc(process4), "process4(int _from=0, int _in=1, int var=2) -> int")
|
||||
|
||||
check(inspect.getdoc(process_complex_defval), "process_complex_defval(val=PROCESS_DEFAULT_VALUE, factor=some_type(-1)) -> int")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue