-
-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Labels
Description
Description of the bug
In __init__ methods, when we do for example:
def __init__(self, arg: str) -> None:
self.arg: str = arg
"""Description."""Then Griffe thinks the arg value is the arg member, which it is not. It is an argument value, not a member of the current class.
This is annoying once docs are rendered, as the value will cross-reference to the member itself. The upcoming backlinks feature also suffers from it and will render a "used by" link pointing to itself.
Expected behavior
Griffe / mkdocstrings should not link such instance attribute values this way. I suppose it needs special casing somewhere 🤔
Reactions are currently unavailable