Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docstrings aren't rendered at all #21

Closed
avlahop opened this issue Apr 6, 2020 · 1 comment
Closed

Docstrings aren't rendered at all #21

avlahop opened this issue Apr 6, 2020 · 1 comment

Comments

@avlahop
Copy link

avlahop commented Apr 6, 2020

I am trying to create a documentation using your plugin and mkdocs. I have material theme installed. My code is the following:

class MyClass(MyBaseClass):
    """
    Client to connect synchronously with diamant
    """
    def __init__(self, builder: "MyClass.Builder"):
        """

        This is the synchronous version of the client.

        :param MyClass.Builder builder: Builder object to build
            client
        """
        super().__init__(base_url=url)
        self.__api_token = builder.api_token
        self.__connection_timeout = builder.connection_timeout
        self.__read_timeout = builder.read_timeout

md file

::: mymodule.MyClass
    :docstring:

mkdocs.yml

markdown_extensions:
- extra
- admonition
- mkautodoc
- pymdownx.caret
- pymdownx.critic
- pymdownx.superfences
- codehilite:
    linenums: true
    guess_lang: false
- toc:
    permalink: 🔗
- pymdownx.emoji:
    emoji_generator: !!python/name:pymdownx.emoji.to_svg

When running mkdocs serve page is rendered normally with class definition but with two issues:

  1. No types on the constructor parameters (builder doesn't get a type)
  2. No docstrings are rendered

class mymodle.MyClass(builder) is the only think that is rendered.
Is there as particular way to write docstring to use your plugin?

@tomchristie
Copy link
Owner

I'd love to be able to help, but I'm not able to provide enough time to dig into whatever issues you're having with the extension.

You might try asking on here... https://gitter.im/encode/community or taking a look at one of the projects that uses this extension, to see how to set it up. (Eg. httpx)

All the best,

Tom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants