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
When adding declaration to symbols, there's at least one case where the resolved declaration (which is obtained via the submodule fallback) is of type Alias and it refers to a module, still the range is populated with the symbol data, causing clients to try to navigate to inexistent locations.
# pyright_bug/main.pyfrom ..pyright_bug_2importbug# <- this symbol's declaration resolves to the right path but an inexistent range (the symbol's own range)
# pyright_bug_2/bug.pyBUG="HERE"
Expected behavior
Declarations of modules should resolve with an empty range.
The text was updated successfully, but these errors were encountered:
andrestone
changed the title
Invalid range when adding declaration for modules imported using from .a import b syntax
Invalid range when adding declaration for modules imported using from ..a import b syntax
Jan 24, 2023
Describe the bug
When adding declaration to symbols, there's at least one case where the resolved declaration (which is obtained via the submodule fallback) is of type
Alias
and it refers to a module, still the range is populated with the symbol data, causing clients to try to navigate to inexistent locations.To Reproduce
Use the following project structure:
Expected behavior
Declarations of modules should resolve with an empty range.
The text was updated successfully, but these errors were encountered: