You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 🤔
The text was updated successfully, but these errors were encountered:
pawamoy
changed the title
bug: Don't conflate passed argument with scope variable
bug: Don't conflate passed argument with class member (instance attribute)
Feb 2, 2025
Description of the bug
In
__init__
methods, when we do for example:Then Griffe thinks the
arg
value is thearg
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 🤔
The text was updated successfully, but these errors were encountered: