Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

'Go to Definition' for relative imports not resolving directly to the appropriate module #24

Closed
brettcannon opened this issue Sep 4, 2018 · 1 comment
Assignees
Labels
bug Something isn't working feature: imports
Milestone

Comments

@brettcannon
Copy link
Member

Let's say I have pkg and pkg.subpkg, both packages. I also have pkg.mod and pkg.subpkg.submod, both modules. If I do from .. import mod from within pkg.subpkg.submode I get asked which package to resolve to -- pkg/__init__.py or pkg/mod.py -- even though pkg.__init__ is empty. I would expect the lack of ambiguity to not ask me which package to resolve to.

Attached are the test files I was using.
pkg.zip

@MikhailArkhipov MikhailArkhipov self-assigned this Feb 8, 2019
@MikhailArkhipov
Copy link

To verify with #546

@MikhailArkhipov MikhailArkhipov added this to the Feb 2019.2 milestone Feb 8, 2019
@MikhailArkhipov MikhailArkhipov added bug Something isn't working feature: imports and removed enhancement New feature or request feature: references labels Feb 28, 2019
AlexanderSher added a commit to AlexanderSher/python-language-server that referenced this issue Mar 5, 2019
jakebailey pushed a commit to jakebailey/python-language-server that referenced this issue Nov 1, 2019
…ng directly to the appropriate module (microsoft#702)

* Fix microsoft#24: 'Go to Definition' for relative imports not resolving directly to the appropriate module

* Add test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working feature: imports
Projects
None yet
Development

No branches or pull requests

3 participants