-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
gh-110631: Set three-space indents for reST in EditorConfig #110635
Conversation
Thanks @hugovk for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…thonGH-110635) Set three-space indents in EditorConfig (cherry picked from commit 66a9b10) Co-authored-by: Hugo van Kemenade <[email protected]>
GH-110637 is a backport of this pull request to the 3.12 branch. |
GH-110638 is a backport of this pull request to the 3.11 branch. |
…thonGH-110635) Set three-space indents in EditorConfig (cherry picked from commit 66a9b10) Co-authored-by: Hugo van Kemenade <[email protected]>
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.
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. |
…thon#110635) Set three-space indents in EditorConfig
https://devguide.python.org/documentation/style-guide/#use-of-whitespace says:
EditorConfig is read by many editors, and there are plugins for others, so helps avoid incorrect tabs in reST files.
https://editorconfig.org/