Skip to content

Type hints for custom objects not linked #333

Open
@cgebbe

Description

@cgebbe

Expected Behavior

File called 20210409_pdoc.py

class Child:
    def __init__(self, name: str ="child"):
        """
        One child description

        Args:
            name: name of child
        """
        self.name: str = name



class Parent:
    cls_child: Child = Child("name of cls child")

    def __init__(self, child: Child = None):
        """
        Parent object

        Args:
            child: child instance
        """
        self.child: Child = child

Running pdoc3 20210409_pdoc.py --html yields

image

Ideally, the type hints would be links to the actual class.

Actual Behavior

No links, but instead the filename is printed

Additional info

  • pdoc version: pdoc3 0.9.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions