I have the following function definition (docstring simplified for this example):
def ui(*classes, call_init=False):
'create a metaclass based on *classes*'
...
When I create a documentation using sphinx-autodoc (specifically, automodule), it generates the following signature for this function
ui(call_init, *classes)
Can anyone explain why sphinx-autodoc is getting the signature the wrong way round? Also, is there a way to get it to include default value of *call_init*?
According to comments made by Wooble on the question, this is a python 2/python 3 difference. And there’s already a bug report with an available patch: https://bitbucket.org/birkenfeld/sphinx/issue/828/autodoc-python3-keyword-only-arguments .