Title: Check keyword arguments in class definitions · Issue #2653 · python/mypy · GitHub
Open Graph Title: Check keyword arguments in class definitions · Issue #2653 · python/mypy
X Title: Check keyword arguments in class definitions · Issue #2653 · python/mypy
Description: Currently, this incorrect code passes mypy: class C(a=3): pass It should check that __new__/__init_subclass__ accepts these keyword arguments. This doesn't seem high-priority to fix since custom class kwargs are rarely used and this shou...
Open Graph Description: Currently, this incorrect code passes mypy: class C(a=3): pass It should check that __new__/__init_subclass__ accepts these keyword arguments. This doesn't seem high-priority to fix since custom cl...
X Description: Currently, this incorrect code passes mypy: class C(a=3): pass It should check that __new__/__init_subclass__ accepts these keyword arguments. This doesn't seem high-priority to fix since custo...
Opengraph URL: https://github.com/python/mypy/issues/2653
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Check keyword arguments in class definitions","articleBody":"Currently, this incorrect code passes mypy:\r\n\r\n```\r\nclass C(a=3):\r\n pass\r\n```\r\n\r\nIt should check that `__new__`/`__init_subclass__` accepts these keyword arguments.\r\n\r\nThis doesn't seem high-priority to fix since custom class kwargs are rarely used and this should usually cause import-time errors anyway when running the code, but I'm reporting it so it can be tracked.","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2017-01-07T12:19:16Z","url":"https://github.com/python/mypy/issues/2653"}
| 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:66ad945f-ad5d-e7ac-a4a0-6d5d9c8a79cc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D52A:157BA1:4A4F8E:64165E:6B002F04 |
| html-safe-nonce | 762a364a20c72088154a7aee4d98568064e24b972333b5c5cfc760401bb97218 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTJBOjE1N0JBMTo0QTRGOEU6NjQxNjVFOjZCMDAyRjA0IiwidmlzaXRvcl9pZCI6IjUzNTA1MzkzMDEzMDQxNTE4MTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7ca83a4d10589c4c8911bba0b1dc0acac75bb8087d42ba9f0913ff83cd41b216 |
| hovercard-subject-tag | issue:199358509 |
| 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/2653/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4832f7321860ef6850c57b1c4655d67af00f6ed04fd33a3022aec6720dffe928/python/mypy/issues/2653 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4832f7321860ef6850c57b1c4655d67af00f6ed04fd33a3022aec6720dffe928/python/mypy/issues/2653 |
| og:image:alt | Currently, this incorrect code passes mypy: class C(a=3): pass It should check that __new__/__init_subclass__ accepts these keyword arguments. This doesn't seem high-priority to fix since custom cl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JelleZijlstra |
| 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