@@ -317,7 +317,7 @@ Module contents
317317 :func: `!field `, then the class attribute for this field will be
318318 replaced by the specified *default * value. If *default * is not
319319 provided, then the class attribute will be deleted. The intent is
320- that after the :func: ` @ dataclass <dataclass> ` decorator runs, the class
320+ that after the :deco: ` dataclass ` decorator runs, the class
321321 attributes will all contain the default values for the fields, just
322322 as if the default value itself were specified. For example,
323323 after::
@@ -427,20 +427,20 @@ Module contents
427427 :data: `typing.Any ` is used for ``type ``. The values of *init *,
428428 *repr *, *eq *, *order *, *unsafe_hash *, *frozen *,
429429 *match_args *, *kw_only *, *slots *, and *weakref_slot * have
430- the same meaning as they do in :func: ` @ dataclass <dataclass> `.
430+ the same meaning as they do in :deco: ` dataclass `.
431431
432432 If *module * is defined, the :attr: `!__module__ ` attribute
433433 of the dataclass is set to that value.
434434 By default, it is set to the module name of the caller.
435435
436436 The *decorator * parameter is a callable that will be used to create the dataclass.
437437 It should take the class object as a first argument and the same keyword arguments
438- as :func: ` @ dataclass <dataclass> `. By default, the :func: ` @ dataclass <dataclass> `
438+ as :deco: ` dataclass `. By default, the :deco: ` dataclass `
439439 function is used.
440440
441441 This function is not strictly required, because any Python
442442 mechanism for creating a new class with :attr: `~object.__annotations__ ` can
443- then apply the :func: ` @ dataclass <dataclass> ` function to convert that class to
443+ then apply the :deco: ` dataclass ` function to convert that class to
444444 a dataclass. This function is provided as a convenience. For
445445 example::
446446
@@ -569,7 +569,7 @@ Post-init processing
569569 def __post_init__(self):
570570 self.c = self.a + self.b
571571
572- The :meth: `~object.__init__ ` method generated by :func: ` @ dataclass <dataclass> ` does not call base
572+ The :meth: `~object.__init__ ` method generated by :deco: ` dataclass ` does not call base
573573class :meth: `!__init__ ` methods. If the base class has an :meth: `!__init__ ` method
574574that has to be called, it is common to call this method in a
575575:meth: `__post_init__ ` method::
@@ -599,7 +599,7 @@ parameters to :meth:`!__post_init__`. Also see the warning about how
599599Class variables
600600---------------
601601
602- One of the few places where :func: ` @ dataclass <dataclass> ` actually inspects the type
602+ One of the few places where :deco: ` dataclass ` actually inspects the type
603603of a field is to determine if a field is a class variable as defined
604604in :pep: `526 `. It does this by checking if the type of the field is
605605:data: `typing.ClassVar `. If a field is a ``ClassVar ``, it is excluded
@@ -612,7 +612,7 @@ module-level :func:`fields` function.
612612Init-only variables
613613-------------------
614614
615- Another place where :func: ` @ dataclass <dataclass> ` inspects a type annotation is to
615+ Another place where :deco: ` dataclass ` inspects a type annotation is to
616616determine if a field is an init-only variable. It does this by seeing
617617if the type of a field is of type :class: `InitVar `. If a field
618618is an :class: `InitVar `, it is considered a pseudo-field called an init-only
@@ -646,7 +646,7 @@ Frozen instances
646646----------------
647647
648648It is not possible to create truly immutable Python objects. However,
649- by passing ``frozen=True `` to the :func: ` @ dataclass <dataclass> ` decorator you can
649+ by passing ``frozen=True `` to the :deco: ` dataclass ` decorator you can
650650emulate immutability. In that case, dataclasses will add
651651:meth: `~object.__setattr__ ` and :meth: `~object.__delattr__ ` methods to the class. These
652652methods will raise a :exc: `FrozenInstanceError ` when invoked.
@@ -662,7 +662,7 @@ must use :meth:`!object.__setattr__`.
662662Inheritance
663663-----------
664664
665- When the dataclass is being created by the :func: ` @ dataclass <dataclass> ` decorator,
665+ When the dataclass is being created by the :deco: ` dataclass ` decorator,
666666it looks through all of the class's base classes in reverse MRO (that
667667is, starting at :class: `object `) and, for each dataclass that it finds,
668668adds the fields from that base class to an ordered mapping of fields.
@@ -786,7 +786,7 @@ for :attr:`!x` when creating a class instance will share the same copy
786786of :attr: `!x `. Because dataclasses just use normal Python class
787787creation they also share this behavior. There is no general way
788788for Data Classes to detect this condition. Instead, the
789- :func: ` @ dataclass <dataclass> ` decorator will raise a :exc: `ValueError ` if it
789+ :deco: ` dataclass ` decorator will raise a :exc: `ValueError ` if it
790790detects an unhashable default parameter. The assumption is that if
791791a value is unhashable, it is mutable. This is a partial solution,
792792but it does protect against many common errors.
@@ -820,7 +820,7 @@ default value have the following special behaviors:
820820 :meth: `~object.__get__ ` or :meth: `!__set__ ` method is called rather than returning or
821821 overwriting the descriptor object.
822822
823- * To determine whether a field contains a default value, :func: ` @ dataclass <dataclass> `
823+ * To determine whether a field contains a default value, :deco: ` dataclass `
824824 will call the descriptor's :meth: `!__get__ ` method using its class access
825825 form: ``descriptor.__get__(obj=None, type=cls) ``. If the
826826 descriptor returns a value in this case, it will be used as the
0 commit comments