Title: 'Go to Definition' for relative imports not resolving directly to the appropriate module · Issue #24 · microsoft/python-language-server · GitHub
Open Graph Title: 'Go to Definition' for relative imports not resolving directly to the appropriate module · Issue #24 · microsoft/python-language-server
X Title: 'Go to Definition' for relative imports not resolving directly to the appropriate module · Issue #24 · microsoft/python-language-server
Description: 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....
Open Graph Description: 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 r...
X Description: 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 ...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/24
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"'Go to Definition' for relative imports not resolving directly to the appropriate module","articleBody":"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.\r\n\r\nAttached are the test files I was using.\r\n[pkg.zip](https://github.com/Microsoft/python-language-server/files/2349710/pkg.zip)\r\n","author":{"url":"https://github.com/brettcannon","@type":"Person","name":"brettcannon"},"datePublished":"2018-09-04T18:15:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/24/python-language-server/issues/24"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1a7650fb-c5d6-3104-661b-1ea80b3e14af |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E9F6:24AA7C:8CD21:BFCAA:6A523643 |
| html-safe-nonce | a0e77de3d0f11e7322bbd4f815e9850d2583241c34327061cb70571dd270cebb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOUY2OjI0QUE3Qzo4Q0QyMTpCRkNBQTo2QTUyMzY0MyIsInZpc2l0b3JfaWQiOiI0Mzc1MjE0NzUwMjEwMDc4Mjc1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7c9ef4a730859b5986dbd01de0fcbb6613376491706b63bc55ba525757e7c851 |
| hovercard-subject-tag | issue:356921132 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/python-language-server/24/issue_layout |
| twitter:image | https://opengraph.githubassets.com/52de846d4bb99950fe8938cacb975906cb7f144a10c889b59d3d76a4b545769c/microsoft/python-language-server/issues/24 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/52de846d4bb99950fe8938cacb975906cb7f144a10c889b59d3d76a4b545769c/microsoft/python-language-server/issues/24 |
| og:image:alt | 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 r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brettcannon |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/python-language-server git https://github.com/microsoft/python-language-server.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 145901977 |
| octolytics-dimension-repository_nwo | microsoft/python-language-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 145901977 |
| octolytics-dimension-repository_network_root_nwo | microsoft/python-language-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width