jupyterlab-go-to-definition
jupyterlab-go-to-definition copied to clipboard
Wrong reference to shadow name
When I have a property of an object with the same name as a local variable, alt+click
always points me to the local variable even if I want the property. An example to reproduce the error could be as follows:
name = 'hello'
obj = object()
obj.name = 'world'
print(obj.name)
and when you alt+click
on name
on print
line, it goes to 'hello'
line.
Thank you for reporting this issue. This behaviour is indeed not ideal, however, it might be difficult to fix with the current design of this extension.
This should be easier to implement in jupyterlab-lsp but it does not work there yet either (without any in-depth testing I think that we are currently passing .name
to the LSP server but we may need to pass obj.name
).
This is a useful test-case, thank you again for your feedback.