Title: MyPy doesn't understand types.ModuleType · Issue #1498 · python/mypy · GitHub
Open Graph Title: MyPy doesn't understand types.ModuleType · Issue #1498 · python/mypy
X Title: MyPy doesn't understand types.ModuleType · Issue #1498 · python/mypy
Description: I tried doing # type: (module) -> str and MyPy was okay with it, but our linter was not. Some discussion in our Slack channel: Guido: From types import ModuleType? Oh wow. Please file a bug. Mypy uses builtins.module but that doesn't exi...
Open Graph Description: I tried doing # type: (module) -> str and MyPy was okay with it, but our linter was not. Some discussion in our Slack channel: Guido: From types import ModuleType? Oh wow. Please file a bug. Mypy u...
X Description: I tried doing # type: (module) -> str and MyPy was okay with it, but our linter was not. Some discussion in our Slack channel: Guido: From types import ModuleType? Oh wow. Please file a bug. Myp...
Opengraph URL: https://github.com/python/mypy/issues/1498
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MyPy doesn't understand types.ModuleType","articleBody":"I tried doing `# type: (module) -> str` and MyPy was okay with it, but our linter was not. Some discussion in our Slack channel:\n\n> Guido:\n> From types import ModuleType?\n> Oh wow. Please file a bug. Mypy uses builtins.module but that doesn't exist so can't be used at runtime; types.ModuleType exists but mypy doesn't understand it.\n> \n> David Fisher:\n> oh interesting\n> we have a \"class module\" entry in builtins\n> with the comment `# TODO not defined in builtins!`\n","author":{"url":"https://github.com/wittekm","@type":"Person","name":"wittekm"},"datePublished":"2016-05-06T17:33:55Z","url":"https://github.com/python/mypy/issues/1498"}
| 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:b6f68383-d7be-c71c-8975-ec6659e042c1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8782:1C3DC0:FFA9D1:157D9AC:6B005DF4 |
| html-safe-nonce | e98cfba6975a77c2cf5c6c86e5283cc4879be2cdafaa9fcaff1e0ecc6b8b84f0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzgyOjFDM0RDMDpGRkE5RDE6MTU3RDlBQzo2QjAwNURGNCIsInZpc2l0b3JfaWQiOiI2MTY3ODI4MjM1MzEyNjI4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2c8cd2db89008d5324455fcf78848e57db5504e2696d29d4008a9b81fc7142a6 |
| hovercard-subject-tag | issue:153500851 |
| 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/python/mypy/1498/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ab08563cffcf492525b9e82ccd86f6c3226df2ba4cb9fb5269e9f718389ef879/python/mypy/issues/1498 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ab08563cffcf492525b9e82ccd86f6c3226df2ba4cb9fb5269e9f718389ef879/python/mypy/issues/1498 |
| og:image:alt | I tried doing # type: (module) -> str and MyPy was okay with it, but our linter was not. Some discussion in our Slack channel: Guido: From types import ModuleType? Oh wow. Please file a bug. Mypy u... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wittekm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| 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 | eacd927ba6112e3b01ba99c762bd699a4a4f5df7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width