Title: TypeGuard may spuriously narrow Any -> object · Issue #10554 · python/mypy · GitHub
Open Graph Title: TypeGuard may spuriously narrow Any -> object · Issue #10554 · python/mypy
X Title: TypeGuard may spuriously narrow Any -> object · Issue #10554 · python/mypy
Description: I haven't had time to fully reduce this, but in the Sphinx code at https://github.com/sphinx-doc/sphinx/blob/1d4c414319598320f95eed245e4a2f9ad3e5a668/sphinx/ext/coverage.py#L218, the TypeGuards introduced by python/typeshed#5473 lead to ...
Open Graph Description: I haven't had time to fully reduce this, but in the Sphinx code at https://github.com/sphinx-doc/sphinx/blob/1d4c414319598320f95eed245e4a2f9ad3e5a668/sphinx/ext/coverage.py#L218, the TypeGuards int...
X Description: I haven't had time to fully reduce this, but in the Sphinx code at https://github.com/sphinx-doc/sphinx/blob/1d4c414319598320f95eed245e4a2f9ad3e5a668/sphinx/ext/coverage.py#L218, the TypeGuards...
Opengraph URL: https://github.com/python/mypy/issues/10554
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TypeGuard may spuriously narrow Any -> object","articleBody":"I haven't had time to fully reduce this, but in the Sphinx code at https://github.com/sphinx-doc/sphinx/blob/1d4c414319598320f95eed245e4a2f9ad3e5a668/sphinx/ext/coverage.py#L218, the TypeGuards introduced by python/typeshed#5473 lead to an incorrect error:\r\n```\r\n+ sphinx/ext/coverage.py: note: In member \"build_py_coverage\" of class \"CoverageBuilder\":\r\n+ sphinx/ext/coverage.py:218:51: error: Item \"object\" of \"Union[object, object]\" has no attribute \"__doc__\"\r\n```\r\nSeems like some bad interaction with the negative case for the TypeGuards produced by ismethod and isfunction a few lines up.","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2021-05-29T17:37:15Z","url":"https://github.com/python/mypy/issues/10554"}
| 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:3909fccc-914e-24bc-ed00-f77c1a205096 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A966:B1603:3629E7D:4802DA2:6B00482D |
| html-safe-nonce | bf7fd4817f989b5dcff600b1dc487cc7bb2526528c1648459e7ff6f521d40edb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTY2OkIxNjAzOjM2MjlFN0Q6NDgwMkRBMjo2QjAwNDgyRCIsInZpc2l0b3JfaWQiOiI0MjAwODI1NzExMDQyNDE3MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c5274f1d007e9c3b11302c318c69ad2820efa7df20b97d35106b7c0d807a14f1 |
| hovercard-subject-tag | issue:906522545 |
| 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/10554/issue_layout |
| twitter:image | https://opengraph.githubassets.com/63e6b4e359aa5a42c90c5cb8237ba2a7572b28eecfc6a8d7dbb38d1405818b46/python/mypy/issues/10554 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/63e6b4e359aa5a42c90c5cb8237ba2a7572b28eecfc6a8d7dbb38d1405818b46/python/mypy/issues/10554 |
| og:image:alt | I haven't had time to fully reduce this, but in the Sphinx code at https://github.com/sphinx-doc/sphinx/blob/1d4c414319598320f95eed245e4a2f9ad3e5a668/sphinx/ext/coverage.py#L218, the TypeGuards int... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JelleZijlstra |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width