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
# Filter out if the usage is the actual declaration of the thing
usages= [dfordinusagesifnotd.is_definition()]
the default value is always used. It looks like the pluggy weirdness with it failing to pass arguments correctly. Reproduced in 1.8.0 with pluggy 1.2.0 and 1.3.0 on Python 3.11.
Removing the default value (exclude_declaration=False → exclude_declaration) fixes the issue.
The text was updated successfully, but these errors were encountered:
I am unable to find a version of pluggy which worked differently (checked down to 0.x series). I am also unable to narrow down python-lsp-server version (checked down to 1.4.x) which worked correctly. I also see this behaviour on Python 3.8.
From manual debugging it seems that
includeDeclaration
gets handled correctly here:python-lsp-server/pylsp/python_lsp.py
Lines 753 to 757 in 6c168d0
and here:
python-lsp-server/pylsp/python_lsp.py
Lines 516 to 524 in 6c168d0
but when it is passed to
pylsp_references
here:python-lsp-server/pylsp/plugins/references.py
Lines 10 to 17 in 6c168d0
the default value is always used. It looks like the pluggy weirdness with it failing to pass arguments correctly. Reproduced in 1.8.0 with pluggy 1.2.0 and 1.3.0 on Python 3.11.
Removing the default value (
exclude_declaration=False
→exclude_declaration
) fixes the issue.The text was updated successfully, but these errors were encountered: