Pdoc doesn't recognize Google-Style

867 Views Asked by At

I am trying to use the google-style directive with pdoc, but it doesn't work on my side. Where am I wrong? Below is my code. Please help me. :)

    def save(a: str, b:str) -> set:
        """
            Do something

            Args:
                a (str): The first parameter.
                b (str): The second parameter.

            Returns:
                Set: The return value. If result has values then Set of string, otherwise empty set.

            """

OUTPUT

Do something

Args: a (str): The first parameter. b (str): The second parameter.

Returns: Set: The return value. If result has values then Set of string, otherwise empty set.

1

There are 1 best solutions below

0
Maximilian Hils On

Did you tell pdoc to process your docstrings as Google-style docstrings?

Using pdoc --docformat google ./alf.py, I get the following result:

pdoc screenshot