@@ -58,106 +58,115 @@ of these classes.
5858
5959Function 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+ The name 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
109113Class 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.
0 commit comments