Skip to content

gh-118181: Fix parameter markup in AST docs #124473

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

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

tomasr8
Copy link
Member

@tomasr8 tomasr8 commented Sep 24, 2024

There were quite a few so I hope I got all of them 😅
Also, this is a minor docs fix so I'm guessing no news entry is required?

cc @Eclips4 :)


📚 Documentation preview 📚: https://cpython-previews--124473.org.readthedocs.build/

@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Sep 24, 2024
@Eclips4 Eclips4 added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Sep 24, 2024
@@ -267,7 +267,7 @@ Literals

.. class:: Constant(value)

A constant value. The ``value`` attribute of the ``Constant`` literal contains the
A constant value. The *value* attribute of the ``Constant`` literal contains the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this now, I'm not sure it's actually right (sorry for the trouble!). We mark up parameters with italics, but attributes with double backticks. These names are both parameters to the constructor and attributes on the resulting object, but the attribute use case is the most important, as it's more common to inspect an AST than to create AST nodes.

I'll ask on the docs Discord for more opinions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the discussion on Discord, I changed the (few) cases that used *value* to use backticks instead :)

Copy link
Member

@Eclips4 Eclips4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Tomas! I would like to believe that I didn't miss anything while reviewing it.

@JelleZijlstra JelleZijlstra merged commit 09aebb1 into python:main Sep 26, 2024
25 checks passed
@miss-islington-app
Copy link

Thanks @tomasr8 for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 26, 2024
@miss-islington-app
Copy link

Sorry, @tomasr8 and @JelleZijlstra, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 09aebb1fbc0c1d771d4942844d5e2077fcdf56c9 3.12

@bedevere-app
Copy link

bedevere-app bot commented Sep 26, 2024

GH-124600 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Sep 26, 2024
@JelleZijlstra
Copy link
Member

Thanks @tomasr8! Are you interested in doing the 3.12 backport? I guess it failed because I added some AST nodes in 3.13.

@tomasr8
Copy link
Member Author

tomasr8 commented Sep 26, 2024

Thanks @tomasr8! Are you interested in doing the 3.12 backport? I guess it failed because I added some AST nodes in 3.13.

Sure! I can have a look later today or tomorrow if it's ok? :)

@JelleZijlstra
Copy link
Member

Thanks, there's no hurry!

Yhg1s pushed a commit that referenced this pull request Sep 26, 2024
gh-118181: Fix parameter markup in AST docs (GH-124473)
(cherry picked from commit 09aebb1)

Co-authored-by: Tomas R <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Sep 27, 2024

GH-124705 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Sep 27, 2024
@tomasr8 tomasr8 deleted the ast-docs branch September 27, 2024 19:50
JelleZijlstra pushed a commit that referenced this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants