Title: [1.16 regression] Relative order of property methods changes mypy output · Issue #19224 · python/mypy · GitHub
Open Graph Title: [1.16 regression] Relative order of property methods changes mypy output · Issue #19224 · python/mypy
X Title: [1.16 regression] Relative order of property methods changes mypy output · Issue #19224 · python/mypy
Description: Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.
Open Graph Description: Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.
X Description: Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.
Opengraph URL: https://github.com/python/mypy
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[1.16 regression] Relative order of property methods changes mypy output","articleBody":"\u003c!--\nIf you're not sure whether what you're experiencing is a mypy bug, please see the \"Question and Help\" form instead.\nPlease consider:\n\n- checking our common issues page: https://mypy.readthedocs.io/en/stable/common_issues.html\n- searching our issue tracker: https://github.com/python/mypy/issues to see if it's already been reported\n- asking on gitter chat: https://gitter.im/python/typing\n-->\n\n**Bug Report**\n\n\u003c!--\nIf you're reporting a problem with a specific library function, the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues\n\nIf the project you encountered the issue in is open source, please provide a link to the project.\n-->\n\nIn mypy 1.16, the relative ordering of property methods (i.e., `getter`/`setter`/`deleter`) can produce an \"Invalid property setter signature\" error.\n\n**To Reproduce**\n\n[mypy playground with the same example](https://mypy-play.net/?mypy=1.16.0&python=3.13&gist=18c775f7322ed5b9011445f36172dcbf)\n\nHaving an `@deleter` or `@getter` before a `@setter` property method produces an error:\n```python\nclass C:\n _value: int = 0\n\n @property\n def value(self) -> int:\n return self._value\n\n @value.deleter\n def value(self) -> None: ... # error: Invalid property setter signature [misc]\n\n @value.setter\n def value(self, v: int) -> None: ...\n```\n```\n$ mypy t.py\nmain.py:9: error: Invalid property setter signature [misc]\nFound 1 error in 1 file (checked 1 source file)\n```\n\nMove the `@value.deleter` method to after `@value.setter` and the error is fixed.\n```python\nclass C:\n _value: int = 0\n\n @property\n def value(self) -> int:\n return self._value\n\n @value.setter\n def value(self, v: int) -> None: ...\n\n @value.deleter\n def value(self) -> None: ...\n```\n```\n$ mypy t.py\nSuccess: no issues found in 1 source file\n```\n\n**Expected Behavior**\n\n\u003c!--\nHow did you expect mypy to behave? It’s fine if you’re not sure your understanding is correct.\nWrite down what you thought would happen. If you expected no errors, delete this section.\n-->\n\nThe relative ordering should not alter the output of mypy. I'm not aware of any reason why the ordering should matter and all orderings pass mypy in 1.15.\n\n**Your Environment**\n\n\u003c!-- Include as many relevant details about the environment you experienced the bug in -->\n\n- Mypy version used: 1.16\n- Mypy command-line flags: None\n- Mypy configuration options from `mypy.ini` (and other config files): None\n- Python version used: 3.13\n\n\u003c!-- You can freely edit this text, please remove all the lines you believe are unnecessary. -->\n","author":{"url":"https://github.com/gpauloski","@type":"Person","name":"gpauloski"},"datePublished":"2025-06-04T00:14:46Z","url":"https://github.com/python/mypy/issues/19224"}
| 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 | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:faf7d118-e314-88e8-38ba-a4b6b17de799 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 864E:2261EB:1492CF2:1AF9267:6B000CB8 |
| html-safe-nonce | 08dd1c75e5167645bc9e9943a3fa4f32a7cd1bd74bd60afc35ff785fda535a4e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjRFOjIyNjFFQjoxNDkyQ0YyOjFBRjkyNjc6NkIwMDBDQjgiLCJ2aXNpdG9yX2lkIjoiMzY4NjExODc4NTUyMzEyNTQzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f7cc16972a4f11f646920d1381dff30edc07c253e4c9605eca4f3b26c38d6ed2 |
| hovercard-subject-tag | repository:7053637 |
| 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/python/mypy/issues/19224 |
| twitter:image | https://opengraph.githubassets.com/f79ae5636353a0db17350af0a02700f2e9c3bbcf096f9450bf0c369c77cd1022/python/mypy |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f79ae5636353a0db17350af0a02700f2e9c3bbcf096f9450bf0c369c77cd1022/python/mypy |
| og:image:alt | Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cf7ee0062053ad9eb05b6e5de57bd96c2055708bcbada4144946b5ec129cf1d7 |
| turbo-cache-control | no-cache |
| 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 | 9cab7de176a56362d2aabcbb4d1e07e846eba8a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width