Skip to content

Keeping original signatures for functions/methodsΒ #759

@shimizukawa

Description

@shimizukawa

I'm using Sphinx's autodoc feature to document my API.

Example:

#!python

DEFAULT_OPTION = 'default'
def do_something(msg, option=DEFAULT_OPTION):
    print msg

The generated documentation now shows the following signature:

do_something(msg, option='default')

It would be nice if there was a way to tell Sphinx to keep the name of the constant value, i.e.

do_something(msg, option=DEFAULT_OPTION)

At the moment the only alternative is to write all signature by hand again.


Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions