Title: signatures of setters are not checked · Issue #12892 · python/mypy · GitHub
Open Graph Title: signatures of setters are not checked · Issue #12892 · python/mypy
X Title: signatures of setters are not checked · Issue #12892 · python/mypy
Description: class A: @property def foo(self) -> int: ... @foo.setter def foo(self, value: int, value2: str) -> None: # no mypy error ... a = A() a.foo = 1 # runtime error - TypeError: A.foo() missing 1 required positional argument: 'value2' https://...
Open Graph Description: class A: @property def foo(self) -> int: ... @foo.setter def foo(self, value: int, value2: str) -> None: # no mypy error ... a = A() a.foo = 1 # runtime error - TypeError: A.foo() missing 1 require...
X Description: class A: @property def foo(self) -> int: ... @foo.setter def foo(self, value: int, value2: str) -> None: # no mypy error ... a = A() a.foo = 1 # runtime error - TypeError: A.foo() missing 1 r...
Opengraph URL: https://github.com/python/mypy/issues/12892
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"signatures of setters are not checked","articleBody":"```py\r\nclass A:\r\n @property\r\n def foo(self) -> int:\r\n ...\r\n @foo.setter\r\n def foo(self, value: int, value2: str) -> None: # no mypy error\r\n ...\r\n\r\n\r\na = A()\r\n\r\na.foo = 1 # runtime error - TypeError: A.foo() missing 1 required positional argument: 'value2'\r\n```\r\nhttps://mypy-play.net/?mypy=latest&python=3.10&flags=show-error-context%2Cshow-error-codes%2Cstrict%2Ccheck-untyped-defs%2Cdisallow-any-decorated%2Cdisallow-any-expr%2Cdisallow-any-explicit%2Cdisallow-any-generics%2Cdisallow-any-unimported%2Cdisallow-incomplete-defs%2Cdisallow-subclassing-any%2Cdisallow-untyped-calls%2Cdisallow-untyped-decorators%2Cdisallow-untyped-defs%2Cno-implicit-optional%2Cno-implicit-reexport%2Clocal-partial-types%2Cstrict-equality%2Cwarn-incomplete-stub%2Cwarn-redundant-casts%2Cwarn-return-any%2Cwarn-unreachable%2Cwarn-unused-configs%2Cwarn-unused-ignores&gist=3a081cf4b94705271106cf081232887f","author":{"url":"https://github.com/DetachHead","@type":"Person","name":"DetachHead"},"datePublished":"2022-05-28T06:17:28Z","url":"https://github.com/python/mypy/issues/12892"}
| 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:830e1623-b9d4-204d-9ff5-b7f8553f0192 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB16:5875E:21D5702:2DFD6C1:6B002491 |
| html-safe-nonce | e15c9a29516b516d6a8ff6284e269c625f74f123ef589d00e5750d0ee44fb36a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjE2OjU4NzVFOjIxRDU3MDI6MkRGRDZDMTo2QjAwMjQ5MSIsInZpc2l0b3JfaWQiOiI2MTA3NDM3NTkxMTI3MTM5NDczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d6b6224e3c4284841fb49445a0a51d068cff7796635e35007b34dc655cb808af |
| hovercard-subject-tag | issue:1251490553 |
| 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/12892/issue_layout |
| twitter:image | https://opengraph.githubassets.com/df020a98a04fa5f31bc466918bb20d9ead0d76a424eac2ba58ca95f2137b80a4/python/mypy/issues/12892 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/df020a98a04fa5f31bc466918bb20d9ead0d76a424eac2ba58ca95f2137b80a4/python/mypy/issues/12892 |
| og:image:alt | class A: @property def foo(self) -> int: ... @foo.setter def foo(self, value: int, value2: str) -> None: # no mypy error ... a = A() a.foo = 1 # runtime error - TypeError: A.foo() missing 1 require... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DetachHead |
| 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