Title: "maximum semantic analysis iteration count" when combining nested dataclass and undefined field. · Issue #11645 · python/mypy · GitHub
Open Graph Title: "maximum semantic analysis iteration count" when combining nested dataclass and undefined field. · Issue #11645 · python/mypy
X Title: "maximum semantic analysis iteration count" when combining nested dataclass and undefined field. · Issue #11645 · python/mypy
Description: Bug Report The following little snippet causes the following error: test.py: error: INTERNAL ERROR: maximum semantic analysis iteration count reached To Reproduce Create the following file. I know several things are not correct in this f...
Open Graph Description: Bug Report The following little snippet causes the following error: test.py: error: INTERNAL ERROR: maximum semantic analysis iteration count reached To Reproduce Create the following file. I know ...
X Description: Bug Report The following little snippet causes the following error: test.py: error: INTERNAL ERROR: maximum semantic analysis iteration count reached To Reproduce Create the following file. I know ...
Opengraph URL: https://github.com/python/mypy/issues/11645
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"maximum semantic analysis iteration count\" when combining nested dataclass and undefined field.","articleBody":"**Bug Report**\r\n\r\nThe following little snippet causes the following error:\r\n\r\n> test.py: error: INTERNAL ERROR: maximum semantic analysis iteration count reached\r\n\r\n**To Reproduce**\r\n\r\nCreate the following file. I know several things are *not* correct in this file, but that's absolutely the purpose. \r\n\r\n```python\r\nfrom dataclasses import dataclass\r\n\r\ndef func() -> None:\r\n @dataclass\r\n class RequestWriter:\r\n field: bool\r\n\r\n def func() -> None:\r\n something_not_defined\r\n```\r\nRun mypy over it. This is the output:\r\n\r\n```python\r\n $ mypy client1.py\r\nDeferral trace:\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\n client1:11\r\nclient1.py: error: INTERNAL ERROR: maximum semantic analysis iteration count reached\r\nclient1.py:10: error: Method must have at least one argument\r\nFound 2 errors in 1 file (errors prevented further checking)\r\n```\r\n**Expected Behavior**\r\n\r\nMypy should probably point out that:\r\n- ``something_not_defined`` is not defined.\r\n\r\n**Your Environment**\r\n\r\n\u003c!-- Include as many relevant details about the environment you experienced the bug in -->\r\n\r\n- Mypy version used: 0.910\r\n- Mypy command-line flags: None\r\n- Mypy configuration options from `mypy.ini` (and other config files): None\r\n- Python version used: 3.9.5\r\n- Operating system and version: Ubuntu 20.04.1\r\n\r\n","author":{"url":"https://github.com/jonathanslenders","@type":"Person","name":"jonathanslenders"},"datePublished":"2021-11-30T10:06:15Z","url":"https://github.com/python/mypy/issues/11645"}
| 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:af83fd4a-8efc-001d-5975-ca0e53f39742 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ECBA:2148FB:22E771D:2F75FB5:6B002A92 |
| html-safe-nonce | 0b8f6cf8c6083e5fb60bbc5abf0cc79e7f2a09c4554d71c24d97615477e1f626 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0JBOjIxNDhGQjoyMkU3NzFEOjJGNzVGQjU6NkIwMDJBOTIiLCJ2aXNpdG9yX2lkIjoiNjk1NDU0OTE0NjgzMzQ5NjUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f12be3e9b72b42dac944036a27f21ca4e933dac705db6d00d05ed06c9523a571 |
| hovercard-subject-tag | issue:1067036613 |
| 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/11645/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aebee15af8bc9706c22cdfa7598660b68e4fcee74be26cb6ecfec760b80579e3/python/mypy/issues/11645 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aebee15af8bc9706c22cdfa7598660b68e4fcee74be26cb6ecfec760b80579e3/python/mypy/issues/11645 |
| og:image:alt | Bug Report The following little snippet causes the following error: test.py: error: INTERNAL ERROR: maximum semantic analysis iteration count reached To Reproduce Create the following file. I know ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jonathanslenders |
| 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