Title: Declare variables from unresolved imports as Unknown rather than not defining them · Issue #955 · microsoft/python-language-server · GitHub
Open Graph Title: Declare variables from unresolved imports as Unknown rather than not defining them · Issue #955 · microsoft/python-language-server
X Title: Declare variables from unresolved imports as Unknown rather than not defining them · Issue #955 · microsoft/python-language-server
Description: Environment Visual Studio CodeVersion: 1.33.1 Python Extension Version: 2019.3.6558 OS: Windows 10 Python version: 2.7/3.6 Language Server Version: 0.2.47.0 Actual Behavior Given the Python script import clr from System import String def...
Open Graph Description: Environment Visual Studio CodeVersion: 1.33.1 Python Extension Version: 2019.3.6558 OS: Windows 10 Python version: 2.7/3.6 Language Server Version: 0.2.47.0 Actual Behavior Given the Python script ...
X Description: Environment Visual Studio CodeVersion: 1.33.1 Python Extension Version: 2019.3.6558 OS: Windows 10 Python version: 2.7/3.6 Language Server Version: 0.2.47.0 Actual Behavior Given the Python script ...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/955
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Declare variables from unresolved imports as Unknown rather than not defining them","articleBody":"**Environment**\r\nVisual Studio CodeVersion: 1.33.1\r\nPython Extension Version: 2019.3.6558\r\nOS: Windows 10\r\nPython version: 2.7/3.6\r\nLanguage Server Version: 0.2.47.0\r\n\r\n**Actual Behavior**\r\nGiven the Python script\r\n```python\r\nimport clr\r\nfrom System import String\r\n\r\ndef foo():\r\n l = String(\"foo\")\r\n return String(\"foo\")\r\n\r\nif __name__ == \"__main__\":\r\n print(foo())\r\n```\r\nThe line `from System import String` reports the problem \"unresolved import 'System' Python(unresolved-import) [2, 6]\"\r\nThe line `return String(\"foo\")` reports the problem \"Undefined variable: 'String' Python(undefiend-variable) [6, 12]\".\r\n\r\n**Expected Behavior**\r\nThe \"unresolved-import\" warning is expected, but the \"undefined-variable\" is unexpected to me.\r\nInterestingly, `l = String(\"foo\")` is no problem (with 0.2.55.0 [beta], this line is also reported).","author":{"url":"https://github.com/tpajenkamp-dspace","@type":"Person","name":"tpajenkamp-dspace"},"datePublished":"2019-04-15T09:16:32Z","url":"https://github.com/microsoft/python-language-server/issues/955"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:7d2bdca1-b873-67e0-d811-0e78d1302816 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B880:5B76F:7B91F3:A7442E:6AFE6BEB |
| html-safe-nonce | 8eed4c13f08e7c27dc08d5242604f35f9e3f67befec54b2bc094fa3652385977 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODgwOjVCNzZGOjdCOTFGMzpBNzQ0MkU6NkFGRTZCRUIiLCJ2aXNpdG9yX2lkIjoiNDQ3NDQyNjYzNTAzODEyNTAzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f6c23ce0f922df35dfb6dc4c91a6e02dd71b6b7de99fb131412aa441d728d8b6 |
| hovercard-subject-tag | issue:433176778 |
| 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/955/issue_layout |
| twitter:image | https://opengraph.githubassets.com/06922dbf208314deeef78e94a068b122e52e5b48a70e9cad860d1674de320551/microsoft/python-language-server/issues/955 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/06922dbf208314deeef78e94a068b122e52e5b48a70e9cad860d1674de320551/microsoft/python-language-server/issues/955 |
| og:image:alt | Environment Visual Studio CodeVersion: 1.33.1 Python Extension Version: 2019.3.6558 OS: Windows 10 Python version: 2.7/3.6 Language Server Version: 0.2.47.0 Actual Behavior Given the Python script ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tpajenkamp-dspace |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| 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 | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width