GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix indentation in contextlib documentation to three spaces by JustAnotherArchivist · Pull Request #94361 · python/cpython

Conversation

@JustAnotherArchivist

@JustAnotherArchivist JustAnotherArchivist commented Jun 28, 2022

Copy link
Copy Markdown
Contributor

There was a stray space at the beginning of some lines in the async @timeit example.

As this is a trivial typo fix, no issue exists, and a news entry shouldn't be necessary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@JustAnotherArchivist
JustAnotherArchivist requested a review from 1st1 as a code owner June 28, 2022 03:39
@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir labels Jun 28, 2022
serhiy-storchaka
serhiy-storchaka reviewed Jun 28, 2022
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be more consistent to increase the indentation in other part of the example.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JustAnotherArchivist

JustAnotherArchivist commented Jun 28, 2022

Copy link
Copy Markdown
Contributor Author

Oh, good point, I didn't compare it to the other code blocks in that file. Yeah, I suppose it would be slightly more consistent, although I see two, three, four, and five spaces of indentation relative to the preceding paragraphs... It seems like three is the most common though, and that's what the dev guide says as well (three spaces in reST, 4 spaces inside the Python blocks, but the indentation of the code blocks would be part of reST syntax). I'll normalise the entire document to use three for consistency.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JustAnotherArchivist
Fix indentation in contextlib documentation to three spaces
e630b09
@JustAnotherArchivist
JustAnotherArchivist force-pushed the docs-contextlib-indentation-typo branch from b983578 to e630b09 Compare June 28, 2022 18:22
@JustAnotherArchivist JustAnotherArchivist changed the title Fix indentation depth typo in contextlib.asynccontextmanager documentation example Fix indentation in contextlib documentation to three spaces Jun 28, 2022
@AlexWaygood AlexWaygood added the skip news label Jun 28, 2022
@merwok

merwok commented Jul 1, 2022

Copy link
Copy Markdown
Member

I don’t think the churn is worth it. This will not change the output, nor help developers.

rhettinger reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka

serhiy-storchaka commented Jul 1, 2022

Copy link
Copy Markdown
Member

I mostly agree with @merwok -- the churn is too large, and in most cases it does not affect the output. But in two cases, in the original code example and in the versionchanged directive for asynccontextmanager, incorrect indentation affects the output. It is a bug which should be fixed. I may miss other such cases, please re-check me.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slateny

slateny commented Sep 25, 2022

Copy link
Copy Markdown
Contributor

@JustAnotherArchivist Are you still interested in combing through the docs for whitespace / visible formatting changes? I think the important ones listed here are the original stray space and also some three-space indentation in code examples. Another possible change is to remove the >>> from code examples as it doesn't help much with copying:

image

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@merwok

merwok commented Sep 26, 2022

Copy link
Copy Markdown
Member

Another possible change is to remove the >>> from code examples as it doesn't help much with copying:

I think that’s been addressed quite some time ago: there is now a formatting that adds buttons to toggle prompts on/off, and easily copy the code block.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slateny

slateny commented Sep 26, 2022

Copy link
Copy Markdown
Contributor

I think that’s been addressed quite some time ago: there is now a formatting that adds buttons to toggle prompts on/off, and easily copy the code block.

Not 100% on how it works, but in the case above it doesn't have this button in the top right:
image

I'm guessing that all of the code example would need the >>>/... for the button to be generated, otherwise it thinks it's a regular code block.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slateny

slateny commented Oct 2, 2022

Copy link
Copy Markdown
Contributor

I'll start on a new PR here then and close this when that one's open - let me know if you'd still like to continue this one.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slateny

slateny commented Oct 9, 2022

Copy link
Copy Markdown
Contributor

See #98111

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slateny slateny closed this Oct 9, 2022
@JustAnotherArchivist

JustAnotherArchivist commented Dec 8, 2022

Copy link
Copy Markdown
Contributor Author

Apologies, I hadn't seen the notification emails for this for some reason. I disagree with the 'churn' argument, but that's a bit late now. Thanks for the fix, @slateny!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slateny

slateny commented Dec 8, 2022

Copy link
Copy Markdown
Contributor

No worries, thanks for the update 🙂

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka left review comments
@1st1 1st1 Awaiting requested review from 1st1

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@JustAnotherArchivist @merwok @serhiy-storchaka @slateny @bedevere-bot @AlexWaygood
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.