Title: Any type inferred for circular reference due to import cycle · Issue #3277 · python/mypy · GitHub
Open Graph Title: Any type inferred for circular reference due to import cycle · Issue #3277 · python/mypy
X Title: Any type inferred for circular reference due to import cycle · Issue #3277 · python/mypy
Description: The inferred Any type is unexpected: t.py: import t2 def f() -> None: pass reveal_type(t2.f) # Revealed type is 'Any' t2.py: from t import f A better option would be to reveal the correct type or generate an error if it's not possible.
Open Graph Description: The inferred Any type is unexpected: t.py: import t2 def f() -> None: pass reveal_type(t2.f) # Revealed type is 'Any' t2.py: from t import f A better option would be to reveal the correct type or g...
X Description: The inferred Any type is unexpected: t.py: import t2 def f() -> None: pass reveal_type(t2.f) # Revealed type is 'Any' t2.py: from t import f A better option would be to reveal the correc...
Opengraph URL: https://github.com/python/mypy/issues/3277
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Any type inferred for circular reference due to import cycle","articleBody":"The inferred `Any` type is unexpected:\r\n\r\n`t.py`:\r\n\r\n```py\r\nimport t2\r\ndef f() -> None: pass\r\nreveal_type(t2.f) # Revealed type is 'Any'\r\n```\r\n\r\n`t2.py`:\r\n\r\n```py\r\nfrom t import f\r\n```\r\n\r\nA better option would be to reveal the correct type or generate an error if it's not possible.","author":{"url":"https://github.com/JukkaL","@type":"Person","name":"JukkaL"},"datePublished":"2017-04-28T15:31:59Z","url":"https://github.com/python/mypy/issues/3277"}
| 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:9451f1f8-45a6-626b-63a2-7afbf5b733ef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A2F0:3CBF1A:25D9506:33F219D:6B00478C |
| html-safe-nonce | 01fff0d366cbb3be9900d74791e16b571b07a5538468646cbf63c46a279da969 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkYwOjNDQkYxQToyNUQ5NTA2OjMzRjIxOUQ6NkIwMDQ3OEMiLCJ2aXNpdG9yX2lkIjoiNTYyNDM0NzEwNDI2MTQ1NzgwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 736afc766d45c560a24641ee9ed832828b8d82c30b17f3e272bb8d0b49a5b755 |
| hovercard-subject-tag | issue:225116053 |
| 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/3277/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e2f13dc66091ea7cd2428119e3abdb35d6776b79fa6d7b5291f5ebe50bc517b4/python/mypy/issues/3277 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e2f13dc66091ea7cd2428119e3abdb35d6776b79fa6d7b5291f5ebe50bc517b4/python/mypy/issues/3277 |
| og:image:alt | The inferred Any type is unexpected: t.py: import t2 def f() -> None: pass reveal_type(t2.f) # Revealed type is 'Any' t2.py: from t import f A better option would be to reveal the correct type or g... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JukkaL |
| 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 | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width