-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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-85453: Adapt datetime.rst to devguide recommendations for code snippets and variables #118068
Conversation
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.
Most of those changes seem unnecessary. In particular, simple integers don't need code formatting.
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.
IMO, this PR falls into the same trap as #21447 did. I suggest to follow my advice when I closed that PR: implement the improvements as a series of small changes, one kind of change per PR. Resist the temptation to add any unrelated change. See also Diátaxis, our documentation north star, for more information/inspiration.
IMO, this PR should perform one kind of change only:
Mark up code samples, variables and literals with double backquotes.
This implies: do not add other types of markup such as pairs of * or rephrasings.
Follow up with a PR that adds missing :attr:
and :class:
markups. If needed, follow up with a PR that consistently marks up parameter names using pairs of *.
For future reference, @uatach: we try to avoid force-pushes on pull requests. In order to sync with $ git switch main
$ git pull
$ git switch wip
$ git merge --no-ff main -m "Pull in main" See also the devguide :) |
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.
Some comments:
- L323-324, L586-587, and L589 should also be updated
- Please address Jelle's comment: https://github.com/python/cpython/pull/118068/files#r1571709802
- I think the formatting tables (L2400 and onwards) should be left alone (perhaps they are worth their own PR); the changes made unfortunately seem to make the markup in those tables more inconsistent.
@erlend-aasland as I address the comments, should I also resolve the conversations? |
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.
I am not sure that the code formatting should be used for all numbers. Perhaps a variant without this could be simpler to review.
I am not sure that the code formatting instead of italic should be used for references to variables.
|
I have made the requested changes; please review again |
Thanks for making the requested changes! @erlend-aasland, @JelleZijlstra: please review the changes made to this pull request. |
Thank you so much for picking this up, @uatach! Sorry if this turned out an unpleasant review experience for you; thank you for enduring all the nitpicking! Feel free to create a PR for any of the remaining items; they should be easier to review, and hopefully you'll get a better contribution experience :) |
Thanks @uatach for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
…de snippets and variables (pythonGH-118068) Also remove formatting from numeric literals. (cherry picked from commit 809aa9a) Co-authored-by: edson duarte <eduarte.uatach@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Erlend E. Aasland <erlend@python.org>
GH-118244 is a backport of this pull request to the 3.12 branch. |
…ode snippets and variables (GH-118068) (#118244) Also remove formatting from numeric literals. (cherry picked from commit 809aa9a) Co-authored-by: edson duarte <eduarte.uatach@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Erlend E. Aasland <erlend@python.org>
Pull request based on PR #21447 that was closed due to being too big, I've added only the changes related to backquotes in this PR.
📚 Documentation preview 📚: https://cpython-previews--118068.org.readthedocs.build/