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

gh-96265: Formatting changes for faq/programming #98242

Merged
merged 6 commits into from
Nov 2, 2022

Conversation

slateny
Copy link
Contributor

@slateny slateny commented Oct 13, 2022

@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Oct 13, 2022
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

Thanks. Could you also fix the warnings? Some of them I address below and the rest are similar to before, e.g. :meth:`__del__` when they should be :meth:`~object.__del__`, and the rest are correct, but the targets just don't exist as they should yet, and will be fixed as discussed in #86272.

List of warnings
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:455: WARNING: py:meth reference target not found: list.append
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1017: WARNING: c:func reference target not found: sscanf
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1342: WARNING: py:meth reference target not found: __iadd__
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1342: WARNING: py:meth reference target not found: list.extend
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1342: WARNING: py:meth reference target not found: list.extend
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1373: WARNING: py:meth reference target not found: __iadd__
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1550: WARNING: py:meth reference target not found: __setattr__
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1561: WARNING: py:meth reference target not found: __setattr__
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1699: WARNING: py:meth reference target not found: __del__
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1703: WARNING: py:meth reference target not found: __del__
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1703: WARNING: py:meth reference target not found: __del__
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1714: WARNING: py:meth reference target not found: __del__
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1714: WARNING: py:meth reference target not found: __del__
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1734: WARNING: py:meth reference target not found: __del__
C:\Users\C. A. M. Gerlach\Documents\dev\Python\cpython\test\Doc\faq\programming.rst:1849: WARNING: py:meth reference target not found: collections.abc.Sequence.__contains__

Doc/faq/programming.rst Show resolved Hide resolved
Doc/faq/programming.rst Outdated Show resolved Hide resolved
Doc/faq/programming.rst Outdated Show resolved Hide resolved
Doc/faq/programming.rst Outdated Show resolved Hide resolved
Doc/faq/programming.rst Outdated Show resolved Hide resolved
Doc/faq/programming.rst Outdated Show resolved Hide resolved
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

A few more minor tweaks, some more than possibilities than anything, otherwise LGTM

Doc/faq/programming.rst Outdated Show resolved Hide resolved
Doc/faq/programming.rst Outdated Show resolved Hide resolved
Doc/faq/programming.rst Outdated Show resolved Hide resolved
Doc/faq/programming.rst Outdated Show resolved Hide resolved
Doc/faq/programming.rst Outdated Show resolved Hide resolved
@CAM-Gerlach CAM-Gerlach added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Oct 16, 2022
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @slateny

@slateny
Copy link
Contributor Author

slateny commented Oct 16, 2022

LGTM, thanks @slateny

Thanks for the detailed reviews too!

@slateny
Copy link
Contributor Author

slateny commented Nov 2, 2022

@ezio-melotti Could you take a peek at this one? I think it should be good to go

@ezio-melotti ezio-melotti merged commit 0689b99 into python:main Nov 2, 2022
@miss-islington
Copy link
Contributor

Thanks @slateny for the PR, and @ezio-melotti for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @slateny and @ezio-melotti, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 0689b99bb8c4f6058af43a52effaa8a25609dbed 3.10

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 2, 2022
* Formatting changes for faq/programming

* Add missing method formatting, use non-literal formatting

* Fix sphinx warnings

* Some extra formatting missed earlier

* More formatting suggestions from review

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>

* Add missing colon, avoid referening external module

(cherry picked from commit 0689b99)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
@bedevere-bot
Copy link

GH-98991 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Nov 2, 2022
@ezio-melotti ezio-melotti removed the needs backport to 3.10 only security fixes label Nov 2, 2022
@ezio-melotti ezio-melotti added the needs backport to 3.10 only security fixes label Nov 2, 2022
@miss-islington
Copy link
Contributor

Thanks @slateny for the PR, and @ezio-melotti for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @slateny and @ezio-melotti, I had trouble checking out the 3.10 backport branch.
Please retry by removing and re-adding the "needs backport to 3.10" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 0689b99bb8c4f6058af43a52effaa8a25609dbed 3.10

miss-islington added a commit that referenced this pull request Nov 2, 2022
* Formatting changes for faq/programming

* Add missing method formatting, use non-literal formatting

* Fix sphinx warnings

* Some extra formatting missed earlier

* More formatting suggestions from review

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>

* Add missing colon, avoid referening external module

(cherry picked from commit 0689b99)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
@slateny slateny deleted the s/96265-programming branch November 2, 2022 05:19
slateny added a commit to slateny/cpython that referenced this pull request Nov 2, 2022
…GH-98242)

* Formatting changes for faq/programming

* Add missing method formatting, use non-literal formatting

* Fix sphinx warnings

* Some extra formatting missed earlier

* More formatting suggestions from review

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>

* Add missing colon, avoid referening external module

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 0689b99)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
@bedevere-bot
Copy link

GH-98994 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Nov 2, 2022
ezio-melotti pushed a commit that referenced this pull request Nov 3, 2022
…98994)

* Formatting changes for faq/programming

* Add missing method formatting, use non-literal formatting

* Fix sphinx warnings

* Some extra formatting missed earlier

* More formatting suggestions from review

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>

* Add missing colon, avoid referening external module

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 0689b99)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
@@ -273,7 +278,7 @@ main.py::
import mod
print(config.x)

Note that using a module is also the basis for implementing the Singleton design
Note that using a module is also the basis for implementing the singleton design
Copy link
Member

Choose a reason for hiding this comment

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

This change was not useful: classic design patterns are commonly title cased.
But not worth changing back now.

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 news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants