summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-11-19 18:59:50 (GMT)
committerGitHub <noreply@github.com>2023-11-19 18:59:50 (GMT)
commitcf8c8307554939fd299cebfa00ccd49bc758f7ad (patch)
tree49ff02ac9023a8f74c5ff13160c5e13ae40ee442 /Lib/test/test_pydoc.py
parentf521321ddf055636eb33c5b65456404762f5be62 (diff)
downloadcpython-cf8c8307554939fd299cebfa00ccd49bc758f7ad.zip
cpython-cf8c8307554939fd299cebfa00ccd49bc758f7ad.tar.gz
cpython-cf8c8307554939fd299cebfa00ccd49bc758f7ad.tar.bz2
[3.12] gh-112266: Remove `(if defined)` part from `__dict__` and `__weakref__` docstrings (GH-112268) (#112270)
gh-112266: Remove `(if defined)` part from `__dict__` and `__weakref__` docstrings (GH-112268) (cherry picked from commit f8129146ef9e1b71609ef4becc5d508061970733) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r--Lib/test/test_pydoc.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index ddb5187..e70a80f 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -40,8 +40,8 @@ class nonascii:
if test.support.HAVE_DOCSTRINGS:
expected_data_docstrings = (
- 'dictionary for instance variables (if defined)',
- 'list of weak references to the object (if defined)',
+ 'dictionary for instance variables',
+ 'list of weak references to the object',
) * 2
else:
expected_data_docstrings = ('', '', '', '')
@@ -105,10 +105,10 @@ CLASSES
| Data descriptors defined here:
|
| __dict__
- | dictionary for instance variables (if defined)
+ | dictionary for instance variables
|
| __weakref__
- | list of weak references to the object (if defined)
+ | list of weak references to the object
FUNCTIONS
doc_func()
@@ -166,16 +166,16 @@ class A(builtins.object)
Data descriptors defined here:
__dict__
- dictionary for instance variables (if defined)
+ dictionary for instance variables
__weakref__
- list of weak references to the object (if defined)
+ list of weak references to the object
class B(builtins.object)
Data descriptors defined here:
__dict__
- dictionary for instance variables (if defined)
+ dictionary for instance variables
__weakref__
- list of weak references to the object (if defined)
+ list of weak references to the object
Data and other attributes defined here:
NO_MEANING = 'eggs'
__annotations__ = {'NO_MEANING': <class 'str'>}
@@ -192,9 +192,9 @@ class C(builtins.object)
__class_getitem__(item) from builtins.type
Data descriptors defined here:
__dict__
- dictionary for instance variables (if defined)
+ dictionary for instance variables
__weakref__
- list of weak references to the object (if defined)
+ list of weak references to the object
Functions
doc_func()
@@ -826,10 +826,10 @@ class B(A)
| Data descriptors inherited from A:
|
| __dict__
- | dictionary for instance variables (if defined)
+ | dictionary for instance variables
|
| __weakref__
- | list of weak references to the object (if defined)
+ | list of weak references to the object
''' % __name__)
doc = pydoc.render_doc(B, renderer=pydoc.HTMLDoc())
@@ -858,9 +858,9 @@ class B(A)
Data descriptors inherited from A:
__dict__
- dictionary for instance variables (if defined)
+ dictionary for instance variables
__weakref__
- list of weak references to the object (if defined)
+ list of weak references to the object
"""
as_text = html2text(doc)
expected_lines = [line.strip() for line in expected_text.split("\n") if line]