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-110631: Set three-space indents for reST in EditorConfig#110635

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

Merged
AlexWaygood merged 1 commit intopython:mainfromhugovk:editorconfig-rst
Oct 10, 2023

Conversation

hugovk
Copy link
Member

@hugovkhugovk commentedOct 10, 2023
edited
Loading

https://devguide.python.org/documentation/style-guide/#use-of-whitespace says:

All reST files use an indentation of 3 spaces

EditorConfig is read by many editors, and there are plugins for others, so helps avoid incorrect tabs in reST files.

https://editorconfig.org/

ezio-melotti reacted with thumbs up emoji
@hugovkhugovk added needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsOct 10, 2023
@hugovkhugovk changed the titleSet three-space indents for reST in EditorConfiggh-110631: Set three-space indents for reST in EditorConfigOct 10, 2023
@AlexWaygoodAlexWaygoodenabled auto-merge (squash)October 10, 2023 14:30
@AlexWaygoodAlexWaygood merged commit66a9b10 intopython:mainOct 10, 2023
@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 10, 2023
…thonGH-110635)Set three-space indents in EditorConfig(cherry picked from commit66a9b10)Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@bedevere-app
Copy link

GH-110637 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelOct 10, 2023
@bedevere-app
Copy link

GH-110638 is a backport of this pull request to the3.11 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.11only security fixes labelOct 10, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 10, 2023
…thonGH-110635)Set three-space indents in EditorConfig(cherry picked from commit66a9b10)Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
AlexWaygood pushed a commit that referenced this pull requestOct 10, 2023
…H-110635) (#110638)gh-110631: Set three-space indents for reST in EditorConfig (GH-110635)Set three-space indents in EditorConfig(cherry picked from commit66a9b10)Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
AlexWaygood pushed a commit that referenced this pull requestOct 10, 2023
…H-110635) (#110637)gh-110631: Set three-space indents for reST in EditorConfig (GH-110635)Set three-space indents in EditorConfig(cherry picked from commit66a9b10)Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@ezio-melotti
Copy link
Member

ezio-melotti commentedOct 11, 2023
edited
Loading

FWIW, 3 doesn't seem to be the actual indentation level used by rst; it just happens to be one of the most commonly used -- because of directives.

.. directive:   This text should be indented under the 'd' of directive, so 3 spaces* This is a list  * nested lists must be indented under the 'T' above, so 2 spaces

Some other things can be indented with any number of spaces >= 1. Setting 3 as a default is still a good idea.

Note: it's actually a bit more complicated than that. For directives you can also use a different number of spaces as long as you are consistent within the block, whereas lists seems to break more easily. Depending on the combination of what you are using, how you are indenting, and the presence of empty lines between different sections, different things might happen, some of which are not reported as error and, depending on the theme used, might look ok in the final render.

hugovk reacted with thumbs up emoji

@hugovkhugovk deleted the editorconfig-rst branchOctober 11, 2023 10:01
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@AlexWaygoodAlexWaygoodAlexWaygood approved these changes

@ezio-melottiezio-melottiAwaiting requested review from ezio-melotti

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@hugovk@miss-islington@ezio-melotti@AlexWaygood

[8]ページ先頭

©2009-2025 Movatter.jp