Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-133046: Fix heading inast module docstring#133047

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

hunterhogan
Copy link
Contributor

gh-133046: Fix ast module docstring markup for better rendering in VS Code

This PR updates theast module docstring to use--- instead of~~~ for section headers. This change improves the docstring rendering in Visual Studio Code and similar tools, as discussed in issue#133046.

See:#133046

@python-cla-bot
Copy link

python-cla-botbot commentedApr 27, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply theskip news label instead.

@hunterhoganhunterhogan changed the titleFix formatting in module docstring forast https://github.com/python/cpython/issues/133046Fix formatting in module docstring forast https://github.com/python/cpython/issues/133046 gh-133046 133046Apr 27, 2025
@picnixzpicnixz changed the titleFix formatting in module docstring forast https://github.com/python/cpython/issues/133046 gh-133046 133046gh-133046: Fix formatting in module docstring forastApr 27, 2025
@picnixzpicnixz changed the titlegh-133046: Fix formatting in module docstring forastgh-133046: Fix formatting inast module docstringApr 27, 2025
@picnixzpicnixz changed the titlegh-133046: Fix formatting inast module docstringgh-133046: Fixast module docstringApr 27, 2025
@picnixz
Copy link
Member

Quick question but are there other modules with that issue?

@picnixzpicnixz changed the titlegh-133046: Fixast module docstringgh-133046: Fix heading inast module docstringApr 27, 2025
@tomasr8
Copy link
Member

I only foundpyspecific, but that one is internal.

@hugovk
Copy link
Member

hugovk commentedApr 27, 2025
edited
Loading

This is an easy enough fix, but feels like a bug in VS Code.

Have you reported it to VS Code?

There could be other projects also using tildes as underlines, as the tilde is a valid andrecommended underline character for sections in reStructuredText:

Specifically, an underline/overline character may be any non-alphanumeric printable 7-bit ASCII character[7].

[7] The following are all valid section title adornment characters:

! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~

Some characters are more suitable than others. The following are recommended:

= - ` : . ' " ~ ^ _ * + #

https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#sections

ZeroIntensity reacted with thumbs up emoji

@ZeroIntensity
Copy link
Member

reStructuredText

I think it's interpreting it as markdown, not RST.

@AA-Turner
Copy link
Member

Closing as churn, this should be fixed in VS Code.

A

@picnixz
Copy link
Member

I only found pyspecific, but that one is internal.

Let's change it in another PR if@AA-Turner wants to.

@hunterhoganhunterhogan deleted the ast_docstring_syntax_133046 branchApril 27, 2025 15:10
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@isidenticalisidenticalAwaiting requested review from isidenticalisidentical is a code owner

@JelleZijlstraJelleZijlstraAwaiting requested review from JelleZijlstraJelleZijlstra is a code owner

@Eclips4Eclips4Awaiting requested review from Eclips4Eclips4 is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@hunterhogan@picnixz@tomasr8@hugovk@ZeroIntensity@AA-Turner

[8]ページ先頭

©2009-2025 Movatter.jp