@@ -320,7 +320,7 @@ Module contents
320320 :func: `!field `, then the class attribute for this field will be
321321 replaced by the specified *default * value. If *default * is not
322322 provided, then the class attribute will be deleted. The intent is
323- that after the :func: ` @ dataclass <dataclass> ` decorator runs, the class
323+ that after the :deco: ` dataclass ` decorator runs, the class
324324 attributes will all contain the default values for the fields, just
325325 as if the default value itself were specified. For example,
326326 after::
@@ -430,15 +430,15 @@ Module contents
430430 :data: `typing.Any ` is used for ``type ``. The values of *init *,
431431 *repr *, *eq *, *order *, *unsafe_hash *, *frozen *,
432432 *match_args *, *kw_only *, *slots *, and *weakref_slot * have
433- the same meaning as they do in :func: ` @ dataclass <dataclass> `.
433+ the same meaning as they do in :deco: ` dataclass `.
434434
435435 If *module * is defined, the :attr: `!__module__ ` attribute
436436 of the dataclass is set to that value.
437437 By default, it is set to the module name of the caller.
438438
439439 This function is not strictly required, because any Python
440440 mechanism for creating a new class with :attr: `!__annotations__ ` can
441- then apply the :func: ` @ dataclass <dataclass> ` function to convert that class to
441+ then apply the :deco: ` dataclass ` function to convert that class to
442442 a dataclass. This function is provided as a convenience. For
443443 example::
444444
@@ -564,7 +564,7 @@ Post-init processing
564564 def __post_init__(self):
565565 self.c = self.a + self.b
566566
567- The :meth: `~object.__init__ ` method generated by :func: ` @ dataclass <dataclass> ` does not call base
567+ The :meth: `~object.__init__ ` method generated by :deco: ` dataclass ` does not call base
568568class :meth: `!__init__ ` methods. If the base class has an :meth: `!__init__ ` method
569569that has to be called, it is common to call this method in a
570570:meth: `__post_init__ ` method::
@@ -594,7 +594,7 @@ parameters to :meth:`!__post_init__`. Also see the warning about how
594594Class variables
595595---------------
596596
597- One of the few places where :func: ` @ dataclass <dataclass> ` actually inspects the type
597+ One of the few places where :deco: ` dataclass ` actually inspects the type
598598of a field is to determine if a field is a class variable as defined
599599in :pep: `526 `. It does this by checking if the type of the field is
600600:data: `typing.ClassVar `. If a field is a ``ClassVar ``, it is excluded
@@ -607,7 +607,7 @@ module-level :func:`fields` function.
607607Init-only variables
608608-------------------
609609
610- Another place where :func: ` @ dataclass <dataclass> ` inspects a type annotation is to
610+ Another place where :deco: ` dataclass ` inspects a type annotation is to
611611determine if a field is an init-only variable. It does this by seeing
612612if the type of a field is of type :class: `InitVar `. If a field
613613is an :class: `InitVar `, it is considered a pseudo-field called an init-only
@@ -641,7 +641,7 @@ Frozen instances
641641----------------
642642
643643It is not possible to create truly immutable Python objects. However,
644- by passing ``frozen=True `` to the :func: ` @ dataclass <dataclass> ` decorator you can
644+ by passing ``frozen=True `` to the :deco: ` dataclass ` decorator you can
645645emulate immutability. In that case, dataclasses will add
646646:meth: `~object.__setattr__ ` and :meth: `~object.__delattr__ ` methods to the class. These
647647methods will raise a :exc: `FrozenInstanceError ` when invoked.
@@ -657,7 +657,7 @@ must use :meth:`!object.__setattr__`.
657657Inheritance
658658-----------
659659
660- When the dataclass is being created by the :func: ` @ dataclass <dataclass> ` decorator,
660+ When the dataclass is being created by the :deco: ` dataclass ` decorator,
661661it looks through all of the class's base classes in reverse MRO (that
662662is, starting at :class: `object `) and, for each dataclass that it finds,
663663adds the fields from that base class to an ordered mapping of fields.
@@ -781,7 +781,7 @@ for :attr:`!x` when creating a class instance will share the same copy
781781of :attr: `!x `. Because dataclasses just use normal Python class
782782creation they also share this behavior. There is no general way
783783for Data Classes to detect this condition. Instead, the
784- :func: ` @ dataclass <dataclass> ` decorator will raise a :exc: `ValueError ` if it
784+ :deco: ` dataclass ` decorator will raise a :exc: `ValueError ` if it
785785detects an unhashable default parameter. The assumption is that if
786786a value is unhashable, it is mutable. This is a partial solution,
787787but it does protect against many common errors.
@@ -815,7 +815,7 @@ default value have the following special behaviors:
815815 :meth: `~object.__get__ ` or :meth: `!__set__ ` method is called rather than returning or
816816 overwriting the descriptor object.
817817
818- * To determine whether a field contains a default value, :func: ` @ dataclass <dataclass> `
818+ * To determine whether a field contains a default value, :deco: ` dataclass `
819819 will call the descriptor's :meth: `!__get__ ` method using its class access
820820 form: ``descriptor.__get__(obj=None, type=cls) ``. If the
821821 descriptor returns a value in this case, it will be used as the
0 commit comments