Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
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
Uh oh!
There was an error while loading.Please reload this page.
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 commit66a9b10)Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
GH-110637 is a backport of this pull request to the3.12 branch. |
GH-110638 is a backport of this pull request to the3.11 branch. |
…thonGH-110635)Set three-space indents in EditorConfig(cherry picked from commit66a9b10)Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
ezio-melotti commentedOct 11, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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
Uh oh!
There was an error while loading.Please reload this page.
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/