-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor mistake in dataclasses documentation update #108267
Comments
I'm no sphinx expert. Would removing a tilde restore the output text to be |
Yes, removing the tilde gives @FrozenBob Thanks for the report, would you like to create a PR to fix this? |
How on earth is someone supposed to know that? Seriously: where could I find out more info? I'd like to get better at this. |
@ericvsmith there's some useful info on the markup in the devguide here (in particular, see the "quick reference" section at the top of the page): https://devguide.python.org/documentation/markup/ |
If we just remove the tilde, the link will take people to the entry in the data model documentation for the :meth:`!object.__setattr__` That will render as |
Suppressing the link sounds reasonable to me. |
Agreed. |
Fixed a sentence in dataclasses.rst Changed "__setattr__" to "object.__setattr__" in a section that was specifically supposed to refer to the __setattr__ method of the object class. Also suppressed the link to the data model docs for __setattr__, since we're talking about a specific __setattr__ implementation, not __setattr__ methods in general.
…nGH-108355) Fixed a sentence in dataclasses.rst Changed "__setattr__" to "object.__setattr__" in a section that was specifically supposed to refer to the __setattr__ method of the object class. Also suppressed the link to the data model docs for __setattr__, since we're talking about a specific __setattr__ implementation, not __setattr__ methods in general. (cherry picked from commit 79fdacc) Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
…nGH-108355) Fixed a sentence in dataclasses.rst Changed "__setattr__" to "object.__setattr__" in a section that was specifically supposed to refer to the __setattr__ method of the object class. Also suppressed the link to the data model docs for __setattr__, since we're talking about a specific __setattr__ implementation, not __setattr__ methods in general. (cherry picked from commit 79fdacc) Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
…08355) (#108357) gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355) Fixed a sentence in dataclasses.rst Changed "__setattr__" to "object.__setattr__" in a section that was specifically supposed to refer to the __setattr__ method of the object class. Also suppressed the link to the data model docs for __setattr__, since we're talking about a specific __setattr__ implementation, not __setattr__ methods in general. (cherry picked from commit 79fdacc) Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
…08355) (#108358) gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355) Fixed a sentence in dataclasses.rst Changed "__setattr__" to "object.__setattr__" in a section that was specifically supposed to refer to the __setattr__ method of the object class. Also suppressed the link to the data model docs for __setattr__, since we're talking about a specific __setattr__ implementation, not __setattr__ methods in general. (cherry picked from commit 79fdacc) Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
Thanks @FrozenBob! |
This error appears to have been reintroduced during an overhaul of the |
Thank you for your vigilance! |
pythonGH-119082) (cherry picked from commit 17cba55) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
pythonGH-119082) (cherry picked from commit 17cba55) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Thanks @FrozenBob! We've fixed this on |
I think you might need an extra blank line before the comment or something - it's rendering in the generated documentation. |
I see a confused emoji. In case it wasn't clear, this is what's showing up in the docs now:
The part starting with the ".." looks like it was supposed to be a reStructuredText comment, but it's showing up in the actual documentation. I think this may be because it needs a blank line above it. |
I understood the problem — sorry for the ambiguous reaction emoji I applied! I suppose I intended to convey that I was frustrated at myself for not checking the docs preview before merging, but sadly there's no reaction emoji for that exact sentiment ;-) |
(cherry picked from commit 423bbcb) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 423bbcb) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
An update to the dataclasses docs, intended to make magic method names link to the relevant data model documentation, accidentally changed a line that shouldn't have been changed.
The docs used to say
The documentation update accidentally changed
object.__setattr__
to just__setattr__
here, so now it readsThis line was specifically meant to refer to
object.__setattr__
, the__setattr__
method of the baseobject
class, as simple attribute assignment would hit the frozen dataclass's__setattr__
override.This part of the documentation should be reverted. I think it should just take a 1-character change, simply removing a tilde.
Linked PRs
The text was updated successfully, but these errors were encountered: