Skip to content

python domain: Allow short type-names in info field lists #6105

@tk0miya

Description

@tk0miya

Is your feature request related to a problem? Please describe.
The info field lists can describe types of parameters, variables and a return value. But it requires full qualified name of the type.

.. py:function:: foo(x, y, z)

   :param sphinx.environment.BuildEnvironment x: OK
   :param BuildEnvironment y: NG; not a qualname

Full qualified name is unique and strict. But it is boring for marking up and hard to read.

Describe the solution you'd like

  • Recognize the scope of the code?
  • Give a special mark up like ~ (ex. :py:class:`~BuildEnvironment` )
  • Special configuration like PYTHON_PATH?
  • By some special configuration?

Describe alternatives you've considered
Nothing

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions