8000 gh-104679 Fixed syntax highlighting in turtle docs by millefalcon · Pull Request #104682 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-104679 Fixed syntax highlighting in turtle docs #104682

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 4 commits into from
May 20, 2023

Conversation

millefalcon
Copy link
Contributor
@millefalcon millefalcon commented May 20, 2023

Fixed indentation for the code snippets in turtle library docs which was causing syntax highlighting issues

closes #104679


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

@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels May 20, 2023
@millefalcon millefalcon changed the title Fixed syntax highlighting in turtle docs gh-104679 Fixed syntax highlighting in turtle docs May 20, 2023
Copy link
Member
@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thanks! Mostly looks good, one suggestion.

Comment on lines 2026 to 2038
>>> screen.register_shape("turtle.gif")

.. note::
Image shapes *do not* rotate when turning the turtle, so they do not
display the heading of the turtle!
.. note::
Image shapes *do not* rotate when turning the turtle, so they do not
display the heading of the turtle!

(2) *name* is an arbitrary string and *shape* is a tuple of pairs of
coordinates: Install the corresponding polygon shape.

.. doctest::
:skipif: _tkinter is None
.. doctest::
:skipif: _tkinter is None

>>> screen.register_shape("triangle", ((5,-3), (0,5), (-5,-3)))
>>> screen.register_shape("triangle", ((5,-3), (0,5), (-5,-3)))
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, right. My bad. Will fix soon

Copy link
Contributor Author
@millefalcon millefalcon May 20, 2023

Choose a reason for hiding this comment

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

@hugovk Fixed. Is that fine ? 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link
Member

Choose a reason for hiding this comment

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

Thank you!

Copy link
Contributor Author
@millefalcon millefalcon May 20, 2023

Choose a reason for hiding this comment

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

No problem 👍 and thank you

@hugovk hugovk merged commit 2c97878 into python:main May 20, 2023
@miss-islington
Copy link
Contributor

Thanks @millefalcon for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @millefalcon and @hugovk, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 2c97878bb8a09f5aba8bf413bb794f6efd5065df 3.11

@millefalcon millefalcon deleted the fix/syntax-highlighting-turtle-docs branch May 20, 2023 15:43
@millefalcon millefalcon restored the fix/syntax-highlighting-turtle-docs branch May 20, 2023 15:44
@hugovk
Copy link
Member
hugovk commented May 20, 2023

@millefalcon Would you like to make the same change for the 3.11 branch? (No requirement to use cherry_picker.)

@millefalcon
Copy link
Contributor Author

@hugovk Sure. Let me check what one needs to do for targetting a specific branch. Thanks 👍

@bedevere-bot
Copy link

GH-104695 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label May 20, 2023
millefalcon added a commit to millefalcon/cpython that referenced this pull request May 20, 2023
…onGH-104682).

(cherry picked from commit 2c97878)

Co-authored-by: han-solo <hanish0019@gmail.com>
terryjreedy pushed a commit that referenced this pull request May 20, 2023
@millefalcon millefalcon deleted the fix/syntax-highlighting-turtle-docs branch May 20, 2023 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syntax highlighting issue in Turtle docs
4 participants
0