Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix typo in enum documentation #129920

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
Feb 9, 2025
Merged

Fix typo in enum documentation #129920

merged 1 commit into from
Feb 9, 2025

Conversation

Viicos
Copy link
Contributor

@Viicos Viicos commented Feb 9, 2025


πŸ“š Documentation preview πŸ“š: https://cpython-previews--129920.org.readthedocs.build/

@Viicos Viicos requested a review from ethanfurman as a code owner February 9, 2025 21:05
@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels Feb 9, 2025
@picnixz
Copy link
Member

picnixz commented Feb 9, 2025

Ideally, you could use .. code-block:: pycon instead to have the console highlight

@AlexWaygood
Copy link
Member

Ideally, you could use .. code-block:: pycon instead to have the console highlight

It looks like it already has console highlighting @picnixz? It's just below this section of the docs here: https://cpython-previews--129920.org.readthedocs.build/en/129920/library/enum.html#enum.Flag._numeric_repr_. I think pygments is smart enough to figure out that this is a REPL snippet.

Copy link
Contributor

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

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

No need for code block in my opinion for the two lines following it since it generates fine already, why add unnecessary code?

@picnixz
Copy link
Member

picnixz commented Feb 9, 2025

I think pygments is smart enough to figure out that this is a REPL snippet.

In general, :: uses the default code-block which is python. So either the default code-block language was pycon, or Sphinx was smart to change it, or pygment is smart! Thanks for checking it online btw

@picnixz
Copy link
Member

picnixz commented Feb 9, 2025

Update: Sphinx is smart! https://github.com/sphinx-doc/sphinx/blob/03df8119b3548541f1ec74ff4f69869652acb96d/sphinx/highlighting.py#L148-L153

@AlexWaygood AlexWaygood merged commit d05053a into python:main Feb 9, 2025
41 checks passed
@Viicos Viicos deleted the patch-3 branch February 10, 2025 08:06
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 issue skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants