Skip to content

Fix the indentation size in code snippets#3162

Draft
gr1seo wants to merge 2 commits intopallets:stablefrom
gr1seo:fix-indent-size-python-snippets
Draft

Fix the indentation size in code snippets#3162
gr1seo wants to merge 2 commits intopallets:stablefrom
gr1seo:fix-indent-size-python-snippets

Conversation

@gr1seo
Copy link
Copy Markdown

@gr1seo gr1seo commented Nov 29, 2025

Use the same indentation size (4 spaces) for python code snippets, and remove the misplaced newline.

@Rowlando13
Copy link
Copy Markdown
Collaborator

How did you discover this? Did you use some tool? Seems like adjusting spaces in random files.

@gr1seo
Copy link
Copy Markdown
Author

gr1seo commented Nov 30, 2025

I found missing indentation in the Utilities section under Finding Application Folders. After fixing it, I rechecked the docs using these regexes:

^\.\. click\:(?:example|run)\:\:\n{1,2}^(?: {1,3}| {5,7}| {9,11}| {13,15})[\w@]
^```python\n{1,2}^ {1,}[\w@] (added after an additional recheck following your comment, second commit 😅)
^(?:```python|\:caption\:.*\.py)\n{1,2}^(?: {1,3}| {5,7}| {9,11}| {13,15})[\w@]
^ *(?:class|def|with|for|while|if|elif|else).*?\:\n{1,2}(?: {0,3}| {5,7}| {9,11}| {13,15})[\w@]

I also reviewed the files with visible spaces enabled. The fix was done manually, without any tools, just the IDE’s find functionality.

@Rowlando13
Copy link
Copy Markdown
Collaborator

@gr1seo Thanks for find these. Unfortunately I am not going to accept them at this time. Restructured text is a bit finicky with stuff and can silently fail with formatting, so it would require me to go through and manually view every section of the docs that correlates to the change. As it is everything works. I am planning on implementing a formatter in the future to handle these issues. I will leave this PR is draft for reference.

@Rowlando13 Rowlando13 marked this pull request as draft December 24, 2025 23:01
@kdeldycke kdeldycke changed the base branch from main to stable April 16, 2026 09:34
@kdeldycke kdeldycke added the docs label Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants