Skip to content
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

Typing docs: normalize some indents in code examples #120912

Conversation

SigureMo
Copy link
Contributor

@SigureMo SigureMo commented Jun 23, 2024

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels Jun 23, 2024
@SigureMo SigureMo changed the title docs: fix wrong indentation in TypeVarTuple example docs: fix wrong indentation size in TypeVarTuple example Jun 23, 2024
@AlexWaygood
Copy link
Member

AlexWaygood commented Jun 23, 2024

FWIW this isn't really "wrong" -- the code compiles and works fine with 8-space indentation here.

Nonetheless, I wouldn't be opposed to normalising the indentation of code examples in the typing docs. But if we want to change this place, we should also change the other place in typing.rst where parameters are indented with eight spaces instead of four:

def broadcast_message(
message: str,
servers: Sequence[tuple[tuple[str, int], dict[str, str]]]) -> None:
...

@SigureMo SigureMo changed the title docs: fix wrong indentation size in TypeVarTuple example docs: normalizing indent sizes in typing document Jun 23, 2024
@SigureMo
Copy link
Contributor Author

FWIW this isn't really "wrong" -- the code compiles and works fine with 8-space indentation here.

Thx! I've updated the PR title and description.

@AlexWaygood AlexWaygood changed the title docs: normalizing indent sizes in typing document Typing docs: normalize some indents in code examples Jun 23, 2024
@AlexWaygood AlexWaygood enabled auto-merge (squash) June 23, 2024 16:06
@AlexWaygood AlexWaygood added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Jun 23, 2024
@AlexWaygood AlexWaygood merged commit 0b918e8 into python:main Jun 23, 2024
29 checks passed
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 23, 2024
(cherry picked from commit 0b918e8)

Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 23, 2024

GH-120915 is a backport of this pull request to the 3.13 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 23, 2024
(cherry picked from commit 0b918e8)

Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 23, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jun 23, 2024

GH-120916 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jun 23, 2024
@SigureMo SigureMo deleted the fix-wrong-indentation-in-type-var-tuple-example branch June 23, 2024 16:16
AlexWaygood pushed a commit that referenced this pull request Jun 23, 2024
… (#120916)

Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
AlexWaygood pushed a commit that referenced this pull request Jun 23, 2024
… (#120915)

Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
mrahtz pushed a commit to mrahtz/cpython that referenced this pull request Jun 30, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants