Title: unittest types not being pulled from typeshed · Issue #301 · microsoft/python-language-server · GitHub
Open Graph Title: unittest types not being pulled from typeshed · Issue #301 · microsoft/python-language-server
X Title: unittest types not being pulled from typeshed · Issue #301 · microsoft/python-language-server
Description: Simplified case: import unittest class Simple(unittest.TestCase): def test_success(self): self.assertEqual(42, 42) def test_exception(self): with self.assertRaises(Exception) as em: raise Exception These have typeshed types: def assertEq...
Open Graph Description: Simplified case: import unittest class Simple(unittest.TestCase): def test_success(self): self.assertEqual(42, 42) def test_exception(self): with self.assertRaises(Exception) as em: raise Exception...
X Description: Simplified case: import unittest class Simple(unittest.TestCase): def test_success(self): self.assertEqual(42, 42) def test_exception(self): with self.assertRaises(Exception) as em: raise Exception...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/301
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"unittest types not being pulled from typeshed","articleBody":"Simplified case:\r\n\r\n```python\r\nimport unittest\r\n\r\nclass Simple(unittest.TestCase):\r\n def test_success(self):\r\n self.assertEqual(42, 42)\r\n\r\n def test_exception(self):\r\n with self.assertRaises(Exception) as em:\r\n raise Exception\r\n```\r\n\r\nThese have typeshed types:\r\n\r\n```python\r\ndef assertEqual(self, first: Any, second: Any, msg: Any = ...) -\u003e None: ...\r\n\r\n@overload\r\n def assertRaises(self,\r\n exception: Union[Type[_E], Tuple[Type[_E], ...]],\r\n msg: Any = ...) -\u003e _AssertRaisesContext[_E]: ...\r\n```\r\n\r\nBut in VSC you see:\r\n\r\n\r\n\r\nThe parameter types aren't shown for `assertEqual`, and there are no type hints for `em` in `test_exception` (not shown in the screenshot).","author":{"url":"https://github.com/jakebailey","@type":"Person","name":"jakebailey"},"datePublished":"2018-10-23T20:07:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/301/python-language-server/issues/301"}
| 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:4c1bf5a5-18ab-f213-6417-a21106fa0b22 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A3EC:1A12B5:D461AE:12A60E1:6A4E8EE1 |
| html-safe-nonce | 9876306ca43e3e203b7be0d13408ae86a674560f94f82be6d37e3823c737934e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0VDOjFBMTJCNTpENDYxQUU6MTJBNjBFMTo2QTRFOEVFMSIsInZpc2l0b3JfaWQiOiIyODg5NTU4OTc2Njc1ODc2NTc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 206f9e0efacf1466d77908d7e8aae2c6e234a841e12cde6b4dddc6f85af4e6cb |
| hovercard-subject-tag | issue:373178541 |
| 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/301/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bbdca4993faa9e56793b38ef1642a14665714f784968394eb446d3919a9f2ea1/microsoft/python-language-server/issues/301 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bbdca4993faa9e56793b38ef1642a14665714f784968394eb446d3919a9f2ea1/microsoft/python-language-server/issues/301 |
| og:image:alt | Simplified case: import unittest class Simple(unittest.TestCase): def test_success(self): self.assertEqual(42, 42) def test_exception(self): with self.assertRaises(Exception) as em: raise Exception... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jakebailey |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| 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 | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width