Skip to content

Commit 0e61e67

Browse files
dmiyakawamerwok
authored andcommitted
bpo-31567: add or fix decorator markup in docs (#3959)
1 parent 277c840 commit 0e61e67

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Doc/library/abc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ The :mod:`abc` module also provides the following decorators:
278278
:func:`abstractmethod`, making this decorator redundant.
279279

280280

281-
.. decorator:: abstractproperty(fget=None, fset=None, fdel=None, doc=None)
281+
.. decorator:: abstractproperty
282282

283283
A subclass of the built-in :func:`property`, indicating an abstract
284284
property.

Doc/library/functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ are always available. They are listed here in alphabetical order.
196196
base 16). :exc:`ValueError` will be raised if *i* is outside that range.
197197

198198

199-
.. function:: classmethod(function)
199+
.. decorator:: classmethod
200200

201-
Return a class method for *function*.
201+
Transform a method into a class method.
202202

203203
A class method receives the class as implicit first argument, just like an
204204
instance method receives the instance. To declare a class method, use this
@@ -1398,9 +1398,9 @@ are always available. They are listed here in alphabetical order.
13981398

13991399
For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`.
14001400

1401-
.. function:: staticmethod(function)
1401+
.. decorator:: staticmethod
14021402

1403-
Return a static method for *function*.
1403+
Transform a method into a static method.
14041404

14051405
A static method does not receive an implicit first argument. To declare a static
14061406
method, use this idiom::

Doc/library/functools.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ The :mod:`functools` module defines the following functions:
264264
return value
265265

266266

267-
.. decorator:: singledispatch(default)
267+
.. decorator:: singledispatch
268268

269-
Transforms a function into a :term:`single-dispatch <single
269+
Transform a function into a :term:`single-dispatch <single
270270
dispatch>` :term:`generic function`.
271271

272272
To define a generic function, decorate it with the ``@singledispatch``

Doc/library/test.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ The :mod:`test.support` module defines the following functions:
440440
otherwise.
441441

442442

443-
.. decorator:: skip_unless_symlink()
443+
.. decorator:: skip_unless_symlink
444444

445445
A decorator for running tests that require support for symbolic links.
446446

0 commit comments

Comments
 (0)