Refering to a (sphynx autodoc generated) python method (:py:meth:) from a myst-parser markdown file?

330 views Asked by At

I have a section of sphinx doc generated by the sphinx :autoclass: directive

I want to refer to the (docstring) generated doc of a python method from a mystmarkdown file

From

I have tried this:

{:py:meth:}the_module.TheClass.the_method

but the generated doc has no hyperlink, only highlighted the_module.TheClass.the_method

1

There are 1 answers

0
Steve Piercy On

According to the MyST documentation, you would use the following syntax.

Using the role:

{py:meth}`the_module.TheClass.the_method`

Using the Markdown syntax:

[the_method](the_module.TheClass.the_method)