@@ -211,6 +211,12 @@ The following directives are provided for module and class contents:
211211
212212 .. versionadded:: 4.0
213213
214+ .. rst::directive:option:: module
215+ :type: text
216+
217+ Describe the location where the object is defined. The default value is
218+ the module specified by :rst:dir:`py:currentmodule`.
219+
214220 .. rst :directive :: .. py:data:: name
215221
216222 Describes global data in a module, including both variables and values used
@@ -237,6 +243,12 @@ The following directives are provided for module and class contents:
237243
238244 .. versionadded:: 4.0
239245
246+ .. rst::directive:option:: module
247+ :type: text
248+
249+ Describe the location where the object is defined. The default value is
250+ the module specified by :rst:dir:`py:currentmodule`.
251+
240252 .. rst :directive :: .. py:exception:: name
241253
242254 Describes an exception class. The signature can, but need not include
@@ -251,6 +263,12 @@ The following directives are provided for module and class contents:
251263
252264 .. versionadded:: 3.1
253265
266+ .. rst::directive:option:: module
267+ :type: text
268+
269+ Describe the location where the object is defined. The default value is
270+ the module specified by :rst:dir:`py:currentmodule`.
271+
254272 .. rst :directive :: .. py:class:: name
255273 .. py:class:: name(parameters)
256274
@@ -291,6 +309,12 @@ The following directives are provided for module and class contents:
291309
292310 .. versionadded:: 3.1
293311
312+ .. rst::directive:option:: module
313+ :type: text
314+
315+ Describe the location where the object is defined. The default value is
316+ the module specified by :rst:dir:`py:currentmodule`.
317+
294318 .. rst :directive :: .. py:attribute:: name
295319
296320 Describes an object data attribute. The description should include
@@ -317,6 +341,12 @@ The following directives are provided for module and class contents:
317341
318342 .. versionadded:: 4.0
319343
344+ .. rst::directive:option:: module
345+ :type: text
346+
347+ Describe the location where the object is defined. The default value is
348+ the module specified by :rst:dir:`py:currentmodule`.
349+
320350 .. rst :directive :: .. py:property:: name
321351
322352 Describes an object property.
@@ -340,6 +370,12 @@ The following directives are provided for module and class contents:
340370 .. rst:directive:option:: type: type of the property
341371 :type: text
342372
373+ .. rst::directive:option:: module
374+ :type: text
375+
376+ Describe the location where the object is defined. The default value is
377+ the module specified by :rst:dir:`py:currentmodule`.
378+
343379 .. rst :directive :: .. py:method:: name(parameters)
344380
345381 Describes an object method. The parameters should not include the ``self ``
@@ -385,6 +421,12 @@ The following directives are provided for module and class contents:
385421
386422 .. versionadded:: 3.1
387423
424+ .. rst::directive:option:: module
425+ :type: text
426+
427+ Describe the location where the object is defined. The default value is
428+ the module specified by :rst:dir:`py:currentmodule`.
429+
388430 .. rst:directive:option:: property
389431 :type: no value
390432
0 commit comments