Title: Object attribute LSP violation · Issue #2747 · python/mypy · GitHub
Open Graph Title: Object attribute LSP violation · Issue #2747 · python/mypy
X Title: Object attribute LSP violation · Issue #2747 · python/mypy
Description: MyPy should error if subclass is not compatible with its base class. class A: x = None # type: int class B(A): x = None # type: str
Open Graph Description: MyPy should error if subclass is not compatible with its base class. class A: x = None # type: int class B(A): x = None # type: str
X Description: MyPy should error if subclass is not compatible with its base class. class A: x = None # type: int class B(A): x = None # type: str
Opengraph URL: https://github.com/python/mypy/issues/2747
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Object attribute LSP violation","articleBody":"MyPy should error if subclass is not compatible with its base class.\r\n```python\r\nclass A:\r\n x = None # type: int\r\n\r\nclass B(A):\r\n x = None # type: str\r\n```","author":{"url":"https://github.com/roganov","@type":"Person","name":"roganov"},"datePublished":"2017-01-23T15:33:31Z","url":"https://github.com/python/mypy/issues/2747"}
| 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:0d25d40f-0e43-c3f4-4f73-8b821c101a88 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA1E:182C25:FB5E9F:152B208:6B005E09 |
| html-safe-nonce | 927834497e45bfa8accdf22cf755aede836e0ac374c8ba8ef6e95b35200ad8cc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTFFOjE4MkMyNTpGQjVFOUY6MTUyQjIwODo2QjAwNUUwOSIsInZpc2l0b3JfaWQiOiIxNjUyNDUzNDcxNjc0MTk1NDY1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3bed021068bfb7945b75ae5b0b37341325b5585ffd4c4fdabcb87de00b88c6a2 |
| hovercard-subject-tag | issue:202566464 |
| 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/2747/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3a22fb829c0be6dab93112078d08729d17789fab8fdb9c5d2f45f58a222fbe4c/python/mypy/issues/2747 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3a22fb829c0be6dab93112078d08729d17789fab8fdb9c5d2f45f58a222fbe4c/python/mypy/issues/2747 |
| og:image:alt | MyPy should error if subclass is not compatible with its base class. class A: x = None # type: int class B(A): x = None # type: str |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | roganov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73 |
| 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 | eacd927ba6112e3b01ba99c762bd699a4a4f5df7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width