Title: Typo in docstring for override decorator from `typing` module. · Issue #112152 · python/cpython · GitHub
Open Graph Title: Typo in docstring for override decorator from `typing` module. · Issue #112152 · python/cpython
X Title: Typo in docstring for override decorator from `typing` module. · Issue #112152 · python/cpython
Description: typing module documentation Typo description A typo in docstring for override decorator. Under Usage:: we see the following code. class Base: def method(self) -> None: ... pass class Child(Base): @override def method(self) -> None: super...
Open Graph Description: typing module documentation Typo description A typo in docstring for override decorator. Under Usage:: we see the following code. class Base: def method(self) -> None: ... pass class Child(Base): @...
X Description: typing module documentation Typo description A typo in docstring for override decorator. Under Usage:: we see the following code. class Base: def method(self) -> None: ... pass class Child(Base)...
Opengraph URL: https://github.com/python/cpython/issues/112152
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Typo in docstring for override decorator from `typing` module.","articleBody":"# `typing` module documentation\r\n\r\n## Typo description\r\nA typo in docstring for `override` decorator. Under `Usage::` we see the following code.\r\n```python\r\nclass Base:\r\n def method(self) -\u003e None: ...\r\n pass\r\n\r\nclass Child(Base):\r\n @override\r\n def method(self) -\u003e None:\r\n super().method()\r\n```\r\n\r\nBoth `...` and `pass` are used in `Base`'s class method. Since `...` has already been used, `pass` statement does not relate to the method at all, causing `IndentationError`.\r\n\r\n## Suggested solution: remove `...`\r\n```python\r\nclass Base:\r\n def method(self) -\u003e None:\r\n pass\r\n\r\nclass Child(Base):\r\n @override\r\n def method(self) -\u003e None:\r\n super().method()\r\n```\r\n\r\nhttps://github.com/python/cpython/blob/985679f05d1b72965bfbed99d1499c22815375e4/Lib/typing.py#L3348\r\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-112158\n* gh-112162\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Qua27","@type":"Person","name":"Qua27"},"datePublished":"2023-11-16T12:49:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/112152/cpython/issues/112152"}
| 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:2e4d3839-5919-05e6-e96d-89cce05b708d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E398:3CA024:133C2B3:1AE7008:696A3D25 |
| html-safe-nonce | 79d1d3cfb739e025dea80f70cd82f20ba8fd23fc15c9f7c4e1369d95ee057520 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzk4OjNDQTAyNDoxMzNDMkIzOjFBRTcwMDg6Njk2QTNEMjUiLCJ2aXNpdG9yX2lkIjoiNzcwNDM4ODA3OTA4MTYzNTEwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b82d5d17bab30e9f1476a0be72346cfed05dd509d40ef3c9d4e3646b81382fdd |
| hovercard-subject-tag | issue:1996788161 |
| 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/cpython/112152/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b00ad563f27df5cb100836331524af8d41d0182d0fb45147f48c1e686b8c27a5/python/cpython/issues/112152 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b00ad563f27df5cb100836331524af8d41d0182d0fb45147f48c1e686b8c27a5/python/cpython/issues/112152 |
| og:image:alt | typing module documentation Typo description A typo in docstring for override decorator. Under Usage:: we see the following code. class Base: def method(self) -> None: ... pass class Child(Base): @... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Qua27 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| 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 | 13581a31d51edf4a3aca179e10890a4d4f9b6d76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width