Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9dd73cc

Browse files
miss-islingtonhugovkAlexWaygood
authored
[3.11]gh-101100: Fix Sphinx warnings inlibrary/pyclbr.rst (GH-113739) (#113749)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
1 parent1687e85 commit9dd73cc

File tree

3 files changed

+58
-50
lines changed

3 files changed

+58
-50
lines changed

‎Doc/library/pyclbr.rst

Lines changed: 56 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -58,106 +58,115 @@ of these classes.
5858

5959
Function Objects
6060
----------------
61-
Class:class:`Function` instances describe functions defined by def
62-
statements. They have the following attributes:
6361

62+
..class::Function
6463

65-
..attribute::Function.file
64+
Class:class:`!Function` instances describe functions defined by def
65+
statements. They have the following attributes:
6666

67-
Name of the file in which the function is defined.
6867

68+
..attribute::file
6969

70-
..attribute::Function.module
70+
Name of the file in which the function is defined.
7171

72-
The name of the module defining the function described.
7372

73+
..attribute::module
7474

75-
..attribute::Function.name
75+
Thename of the module defining the function described.
7676

77-
The name of the function.
7877

78+
..attribute::name
7979

80-
..attribute::Function.lineno
80+
The name of the function.
8181

82-
The line number in the file where the definition starts.
8382

83+
..attribute::lineno
8484

85-
..attribute::Function.parent
85+
The line number in the file where the definition starts.
8686

87-
For top-level functions, None. For nested functions, the parent.
8887

89-
..versionadded::3.7
88+
..attribute::parent
9089

90+
For top-level functions, ``None``. For nested functions, the parent.
9191

92-
..attribute::Function.children
92+
..versionadded::3.7
9393

94-
A dictionary mapping names to descriptors for nested functions and
95-
classes.
9694

97-
..versionadded::3.7
95+
..attribute::children
9896

97+
A:class:`dictionary <dict>` mapping names to descriptors for nested functions and
98+
classes.
9999

100-
..attribute::Function.is_async
100+
..versionadded::3.7
101101

102-
``True`` for functions that are defined with the ``async`` prefix, ``False`` otherwise.
103102

104-
..versionadded::3.10
103+
..attribute::is_async
104+
105+
``True`` for functions that are defined with the
106+
:keyword:`async <async def>` prefix, ``False`` otherwise.
107+
108+
..versionadded::3.10
105109

106110

107111
.. _pyclbr-class-objects:
108112

109113
Class Objects
110114
-------------
111-
Class:class:`Class` instances describe classes defined by class
112-
statements. They have the same attributes as Functions and two more.
115+
116+
..class::Class
117+
118+
Class:class:`!Class` instances describe classes defined by class
119+
statements. They have the same attributes as:class:`Functions <Function>`
120+
and two more.
113121

114122

115-
..attribute::Class.file
123+
..attribute::file
116124

117-
Name of the file in which the class is defined.
125+
Name of the file in which the class is defined.
118126

119127

120-
..attribute::Class.module
128+
..attribute::module
121129

122-
The name of the module defining the class described.
130+
The name of the module defining the class described.
123131

124132

125-
..attribute::Class.name
133+
..attribute::name
126134

127-
The name of the class.
135+
The name of the class.
128136

129137

130-
..attribute::Class.lineno
138+
..attribute::lineno
131139

132-
The line number in the file where the definition starts.
140+
The line number in the file where the definition starts.
133141

134142

135-
..attribute::Class.parent
143+
..attribute::parent
136144

137-
For top-level classes, None. For nested classes, the parent.
145+
For top-level classes, None. For nested classes, the parent.
138146

139-
..versionadded::3.7
147+
..versionadded::3.7
140148

141149

142-
..attribute::Class.children
150+
..attribute::children
143151

144-
A dictionary mapping names to descriptors for nested functions and
145-
classes.
152+
A dictionary mapping names to descriptors for nested functions and
153+
classes.
146154

147-
..versionadded::3.7
155+
..versionadded::3.7
148156

149157

150-
..attribute::Class.super
158+
..attribute::super
151159

152-
A list of:class:`Class` objects which describe the immediate base
153-
classes of the class being described. Classes which are named as
154-
superclasses but which are not discoverable by:func:`readmodule_ex`
155-
are listed as a string with the class name instead of as
156-
:class:`Class` objects.
160+
A list of:class:`!Class` objects which describe the immediate base
161+
classes of the class being described. Classes which are named as
162+
superclasses but which are not discoverable by:func:`readmodule_ex`
163+
are listed as a string with the class name instead of as
164+
:class:`!Class` objects.
157165

158166

159-
..attribute::Class.methods
167+
..attribute::methods
160168

161-
A dictionary mapping method names to line numbers. This can be
162-
derived from the newer children dictionary, but remains for
163-
back-compatibility.
169+
A:class:`dictionary <dict>` mapping method names to line numbers.
170+
This can be derived from the newer:attr:`children` dictionary,
171+
but remains for
172+
back-compatibility.

‎Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ Doc/library/pickletools.rst
7070
Doc/library/platform.rst
7171
Doc/library/plistlib.rst
7272
Doc/library/profile.rst
73-
Doc/library/pyclbr.rst
7473
Doc/library/pydoc.rst
7574
Doc/library/pyexpat.rst
7675
Doc/library/readline.rst

‎Doc/whatsnew/3.10.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,8 +1315,8 @@ pyclbr
13151315
------
13161316
13171317
Add an``end_lineno`` attribute to the``Function``and``Class``
1318-
objectsin the tree returned by :func:`pyclbr.readline`and
1319-
:func:`pyclbr.readline_ex`. It matches the existing (start)``lineno``.
1318+
objectsin the tree returned by :func:`pyclbr.readmodule`and
1319+
:func:`pyclbr.readmodule_ex`. It matches the existing (start)``lineno``.
13201320
(Contributed by Aviral Srivastavain :issue:`38307`.)
13211321
13221322
shelve

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp