Title: cache bug switching to disallow_incomplete_defs = true · Issue #5413 · python/mypy · GitHub
Open Graph Title: cache bug switching to disallow_incomplete_defs = true · Issue #5413 · python/mypy
X Title: cache bug switching to disallow_incomplete_defs = true · Issue #5413 · python/mypy
Description: version info $ mypy --version mypy 0.620 reproduction script #!/usr/bin/env bash set -euxo pipefail mypy --version rm -rf .mypy_cache : should pass, no special setting echo -e 'def f(x) -> str:\n return ""\n' > t.py echo -e '[mypy]\n' > ...
Open Graph Description: version info $ mypy --version mypy 0.620 reproduction script #!/usr/bin/env bash set -euxo pipefail mypy --version rm -rf .mypy_cache : should pass, no special setting echo -e 'def f(x) -> str:\n r...
X Description: version info $ mypy --version mypy 0.620 reproduction script #!/usr/bin/env bash set -euxo pipefail mypy --version rm -rf .mypy_cache : should pass, no special setting echo -e 'def f(x) -> s...
Opengraph URL: https://github.com/python/mypy/issues/5413
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"cache bug switching to disallow_incomplete_defs = true","articleBody":"### version info\r\n\r\n```console\r\n$ mypy --version\r\nmypy 0.620\r\n```\r\n\r\n### reproduction script\r\n\r\n```bash\r\n#!/usr/bin/env bash\r\nset -euxo pipefail\r\n\r\nmypy --version\r\nrm -rf .mypy_cache\r\n\r\n: should pass, no special setting\r\necho -e 'def f(x) -> str:\\n return \"\"\\n' > t.py\r\necho -e '[mypy]\\n' > mypy.ini\r\nmypy t.py\r\n\r\n: should fail, does not\r\necho -e '[mypy]\\ndisallow_incomplete_defs = true' > mypy.ini\r\nmypy t.py\r\n\r\n: now it properly fails\r\nrm -rf .mypy_cache\r\nmypy t.py\r\n```\r\n\r\n### reproduction output\r\n\r\n```\r\n+ mypy --version\r\nmypy 0.620\r\n+ rm -rf .mypy_cache\r\n+ : should pass, no special setting\r\n+ echo -e 'def f(x) -> str:\\n return \"\"\\n'\r\n+ echo -e '[mypy]\\n'\r\n+ mypy t.py\r\n+ : should fail, does not\r\n+ echo -e '[mypy]\\ndisallow_incomplete_defs = true'\r\n+ mypy t.py\r\n+ : now it properly fails\r\n+ rm -rf .mypy_cache\r\n+ mypy t.py\r\nt.py:1: error: Function is missing a type annotation for one or more arguments\r\n```\r\n\r\n### more obvious file contents\r\n\r\n#### before\r\n\r\n```ini\r\n[mypy]\r\n```\r\n\r\n```python\r\ndef f(x) -> str:\r\n return \"\"\r\n```\r\n\r\n#### after\r\n\r\n```ini\r\n[mypy]\r\ndisallow_incomplete_defs = true\r\n```\r\n\r\n```python\r\ndef f(x) -> str:\r\n return \"\"\r\n```","author":{"url":"https://github.com/asottile","@type":"Person","name":"asottile"},"datePublished":"2018-08-01T17:14:39Z","url":"https://github.com/python/mypy/issues/5413"}
| 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:540580e9-aef4-1ffd-bcdb-4c57100b1eac |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DFF4:30501:262369:33FDE7:6B0024A0 |
| html-safe-nonce | d366656e312f9ff332dd691ca9bf663192091d3af9845ca7d4496a028e6d14e8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkY0OjMwNTAxOjI2MjM2OTozM0ZERTc6NkIwMDI0QTAiLCJ2aXNpdG9yX2lkIjoiODUxOTI2NzQ1MjQ2OTY1MDU5MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | caa254511663d90ae5898a6e03061ecb844631f6bfe2b3d7655c4f5b74255e4c |
| hovercard-subject-tag | issue:346690778 |
| 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/5413/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b0f115fa8b0896bbb6f4b4b7c9d88b9173be460a9982d47da10eea0bee30b34e/python/mypy/issues/5413 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b0f115fa8b0896bbb6f4b4b7c9d88b9173be460a9982d47da10eea0bee30b34e/python/mypy/issues/5413 |
| og:image:alt | version info $ mypy --version mypy 0.620 reproduction script #!/usr/bin/env bash set -euxo pipefail mypy --version rm -rf .mypy_cache : should pass, no special setting echo -e 'def f(x) -> str:\n r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | asottile |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width