Skip to content

Construct docstring Args sections from signatures #112

@USSX-Hares

Description

@USSX-Hares

It would be nice to automatically generate function/method argument types from its signature
(i.e., by calling inspect.signature) if the docstring provides no such information.

It would be helpful in linking the difficult types.
However, it can go wrong with the TypeVar's.

def my_func(a: str, b: str = 'test', *, z: str) -> str:
    """
    Some documentation here
    """
    
    pass

Expected Behavior

Something like that
image

Actual Behavior

image

Additional info

  • pdoc version: 0.6.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions