Title: Inconsistent type inference with `type(None)` · Issue #12658 · python/mypy · GitHub
Open Graph Title: Inconsistent type inference with `type(None)` · Issue #12658 · python/mypy
X Title: Inconsistent type inference with `type(None)` · Issue #12658 · python/mypy
Description: Bug Report TYPE_NONE = type(None) reveal_type(type(None)) # => `Type[None]` reveal_type(TYPE_NONE) # => `builtins.object` Expected Behavior The two reveal_type calls above should print the same thing (Type[None]) Your Environment Mypy ve...
Open Graph Description: Bug Report TYPE_NONE = type(None) reveal_type(type(None)) # => `Type[None]` reveal_type(TYPE_NONE) # => `builtins.object` Expected Behavior The two reveal_type calls above should print the same thi...
X Description: Bug Report TYPE_NONE = type(None) reveal_type(type(None)) # => `Type[None]` reveal_type(TYPE_NONE) # => `builtins.object` Expected Behavior The two reveal_type calls above should print the sa...
Opengraph URL: https://github.com/python/mypy/issues/12658
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inconsistent type inference with `type(None)`","articleBody":"**Bug Report**\r\n\r\n```\r\nTYPE_NONE = type(None)\r\nreveal_type(type(None)) # => `Type[None]`\r\nreveal_type(TYPE_NONE) # => `builtins.object`\r\n```\r\n\r\n**Expected Behavior**\r\n\r\nThe two `reveal_type` calls above should print the same thing (`Type[None]`)\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: 0.942\r\n- Python version used: 3.10.4\r\n- Operating system and version: macOS 12.3.1\r\n","author":{"url":"https://github.com/smackesey","@type":"Person","name":"smackesey"},"datePublished":"2022-04-22T19:09:31Z","url":"https://github.com/python/mypy/issues/12658"}
| 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:d53059d0-1297-26de-6ddb-d6b30b1196f1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D7BE:145630:29174D5:3608B8D:6B000D7C |
| html-safe-nonce | 56522a29364c54e769fb6981c928de68010399cf4ab99bea23fb039388b4d1c9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0JFOjE0NTYzMDoyOTE3NEQ1OjM2MDhCOEQ6NkIwMDBEN0MiLCJ2aXNpdG9yX2lkIjoiODU1OTI3NTg3NTk5MDc2OTAyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5856f6156b392351fe6c427deda2a40e24caf351f267d261833d9c4b69b30f69 |
| hovercard-subject-tag | issue:1212688595 |
| 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/12658/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ac9a4b55dade4cc3e1603f6c7d60afa032bc895bce13d240eeeb0062abd3fa59/python/mypy/issues/12658 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ac9a4b55dade4cc3e1603f6c7d60afa032bc895bce13d240eeeb0062abd3fa59/python/mypy/issues/12658 |
| og:image:alt | Bug Report TYPE_NONE = type(None) reveal_type(type(None)) # => `Type[None]` reveal_type(TYPE_NONE) # => `builtins.object` Expected Behavior The two reveal_type calls above should print the same thi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | smackesey |
| hostname | github.com |
| expected-hostname | github.com |
| None | cf7ee0062053ad9eb05b6e5de57bd96c2055708bcbada4144946b5ec129cf1d7 |
| 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 | 9cab7de176a56362d2aabcbb4d1e07e846eba8a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width