Title: Mypy complains about issues after cache is filled · Issue #11046 · python/mypy · GitHub
Open Graph Title: Mypy complains about issues after cache is filled · Issue #11046 · python/mypy
X Title: Mypy complains about issues after cache is filled · Issue #11046 · python/mypy
Description: Bug Report I have a simpel dot dict implementation. But if I change something in my code somewhere else, mypy complains with weird errors. My current workaround is, to delete the mypy cache before each run To Reproduce (Write your steps ...
Open Graph Description: Bug Report I have a simpel dot dict implementation. But if I change something in my code somewhere else, mypy complains with weird errors. My current workaround is, to delete the mypy cache before ...
X Description: Bug Report I have a simpel dot dict implementation. But if I change something in my code somewhere else, mypy complains with weird errors. My current workaround is, to delete the mypy cache before ...
Opengraph URL: https://github.com/python/mypy/issues/11046
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Mypy complains about issues after cache is filled","articleBody":"**Bug Report**\r\n\r\nI have a simpel dot dict implementation. But if I change something in my code somewhere else, mypy complains with weird errors. My current workaround is, to delete the mypy cache before each run\r\n\r\n**To Reproduce**\r\n\r\n(Write your steps here:)\r\n\r\n1. Clean the mypy cache\r\n2. Create `x.py`\r\n\r\n```python\r\nclass DotDict(dict):\r\n __setattr__ = dict.__setitem__\r\n __delattr__ = dict.__delitem__\r\n __getattr__ = dict.get\r\n```\r\n3. `mypy x.py` --> works fine\r\n4. Add `a=2` to the end of `x.py`\r\n5. `mypy x.py` --> error\r\n\r\n```\r\nx.py:2: error: Incompatible types in assignment (expression has type \"Callable[[Dict[_KT, _VT], _KT, _VT], None]\", base class \"object\" defined the type as \"Callable[[object, str, Any], None]\")\r\nx.py:3: error: Incompatible types in assignment (expression has type \"Callable[[Dict[_KT, _VT], _KT], None]\", base class \"object\" defined the type as \"Callable[[object, str], None]\")\r\n```\r\n\r\n**Expected Behavior**\r\n\r\nNo error\r\n\r\n**Actual Behavior**\r\n\r\nError; seems like a caching issue\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: 0.910\r\n- Mypy command-line flags: _nothing_\r\n- Mypy configuration options from `mypy.ini` (and other config files): _nothing_\r\n- Python version used: 3.7.1\r\n- Operating system and version: Linux\r\n","author":{"url":"https://github.com/kasium","@type":"Person","name":"kasium"},"datePublished":"2021-09-02T16:41:41Z","url":"https://github.com/python/mypy/issues/11046"}
| 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:385156f4-e10a-b14a-2807-3e08593a1a06 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8DD6:DB416:10110FE:14E3431:6AFFF6D2 |
| html-safe-nonce | 3acdd13525ffc243b9f95a5052b18cf11b85b5a01c06407736f67f1dd3f55d2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4REQ2OkRCNDE2OjEwMTEwRkU6MTRFMzQzMTo2QUZGRjZEMiIsInZpc2l0b3JfaWQiOiI3NTA1MjIxMDE4MTM5NDkwMDAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 466b553f11b00211e06211cae0a1887fd3db05175cbcbda4149fcb1fad525562 |
| hovercard-subject-tag | issue:986950578 |
| 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/11046/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6b0e63b1f3ba7841b9d83f87f03032a11d06efd6a1ae32effae35a6b1e219bb0/python/mypy/issues/11046 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6b0e63b1f3ba7841b9d83f87f03032a11d06efd6a1ae32effae35a6b1e219bb0/python/mypy/issues/11046 |
| og:image:alt | Bug Report I have a simpel dot dict implementation. But if I change something in my code somewhere else, mypy complains with weird errors. My current workaround is, to delete the mypy cache before ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kasium |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width