From ef7c0b20806593c5bdc5c004e294371b5d75e10d Mon Sep 17 00:00:00 2001 From: Cody Maloney Date: Thu, 11 Jun 2026 00:04:56 -0700 Subject: [PATCH] gh-101100: Fix Sphinx nitpick in unittest.mock.rst Removes from `.nitignore`. GH-124106 fixed most the warnings but left this one unfixed. GH-113163 fixed many of the dunders referring to the general definitions but this case refers to implementing a mock. Match what `__eq__` and `__ne__` did a few lines before to refer to an implementing instance. --- Doc/library/unittest.mock.rst | 2 +- Doc/tools/.nitignore | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 2ff1015af7a86e0..6ba1b87ea942a90 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -2223,7 +2223,7 @@ return something else:: >>> mock == 3 True -The return value of :meth:`MagicMock.__iter__` can be any iterable object and isn't +The return value of :meth:`!__iter__` can be any iterable object and isn't required to be an iterator: >>> mock = MagicMock() diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore index 31173134dd5019f..aa08f7acb99197a 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -29,7 +29,6 @@ Doc/library/test.rst Doc/library/tkinter.rst Doc/library/tkinter.scrolledtext.rst Doc/library/tkinter.ttk.rst -Doc/library/unittest.mock.rst Doc/library/urllib.parse.rst Doc/library/urllib.request.rst Doc/library/wsgiref.rst