Skip to content

How to have attributes (or source code) shown for TypedDict classes #132

Closed Answered by pawamoy
Andrew-S-Rosen asked this question in Q&A
Discussion options

You must be logged in to vote

You can either:

  • document these attributes
    class RunStatistics(TypedDict):
        """Type hint associated with emmet.core.vasp.calculation.RunStatistics."""
    
        average_memory: float
        """Docs for average memory."""
        max_memory: float
        """Docs for ..."""
        elapsed_time: float
        """Docs for ..."""
        system_time: float
        """Docs for ..."""
        user_time: float
        """Docs for ..."""
        total_time: float
        """Docs for ..."""
        cores: int
        """Docs for ..."""
  • or set show_if_no_docstring: true
    # mkdocs.yml
    plugins:
    - mkdocstrings:
        handlers:
          python:
            options:
              show_if_no_docstring: true
    or
    ::: path.to.RunStatistics
        options:
          show_if_no_do…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Andrew-S-Rosen
Comment options

@Andrew-S-Rosen
Comment options

@pawamoy
Comment options

@Andrew-S-Rosen
Comment options

@pawamoy
Comment options

Answer selected by Andrew-S-Rosen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants