@@ -119,13 +119,13 @@ class EnumLookup:
119119 on top; a closed enumeration inherits this one directly and so is never
120120 handed a ``register`` it would have to refuse.
121121
122- This is a plain mix-in rather than an :class:`~ aenum.Enum` subclass, because
122+ This is a plain mix-in rather than an `` aenum.Enum` ` subclass, because
123123 an enumeration that already has members cannot be subclassed. Mixed in
124124 *before* the member type -- ``class Foo(EnumRegistry, IntFlag)``, or
125125 ``class Bar(EnumLookup, IntEnum)`` -- it contributes methods only, so
126- :mod:` aenum` still resolves the member data type from the enumeration base:
127- ``int`` for :class:`~ aenum.IntEnum` and :class:`~ aenum.IntFlag`, ``str`` for
128- :class:`~ aenum.StrEnum`. That is what lets one base serve each of them, where a
126+ `` aenum` ` still resolves the member data type from the enumeration base:
127+ ``int`` for `` aenum.IntEnum`` and `` aenum.IntFlag` `, ``str`` for
128+ `` aenum.StrEnum` `. That is what lets one base serve each of them, where a
129129 generated template fragment would have needed a separate rendering per
130130 member type.
131131
@@ -134,20 +134,20 @@ class EnumLookup:
134134 ``class Foo(EnumRegistry, IntFlag)`` resolves as ``Foo -> EnumRegistry ->
135135 EnumLookup -> IntFlag -> int -> ...``, so ``_member_type_`` still comes from
136136 the enumeration base and not from anything in this module. Had this tier
137- subclassed :class:`~ aenum.Enum` in order to "be an enum", it would have
137+ subclassed `` aenum.Enum` ` in order to "be an enum", it would have
138138 become the member type itself and broken every one of these shapes at once.
139139
140140 The methods deliberately touch only ``_member_map_``, ``_member_names_`` and
141- ``_value2member_map_``, which both :mod:`enum` and :mod:` aenum` maintain, so
142- nothing on this tier depends on :mod:` aenum` internals at all -- the
143- :func:`~ aenum.extend_enum` call in this module belongs to
141+ ``_value2member_map_``, which both :mod:`enum` and `` aenum` ` maintain, so
142+ nothing on this tier depends on `` aenum` ` internals at all -- the
143+ `` aenum.extend_enum` ` call in this module belongs to
144144 :class:`EnumRegistry`, which is the tier that mutates.
145145
146146 """
147147
148148 if TYPE_CHECKING :
149149 #: The enumeration machinery's own lookup tables and member data type,
150- #: declared here because they are contributed by the :class:`~ aenum.Enum`
150+ #: declared here because they are contributed by the `` aenum.Enum` `
151151 #: base this mix-in is combined with rather than by the mix-in itself.
152152 _member_map_ : 'dict[str, Self]'
153153 _member_names_ : 'list[str]'
@@ -303,7 +303,7 @@ def get(cls, key: 'Any', default: 'Any' = NO_DEFAULT) -> 'Self':
303303 :class:`~pcapkit.const.pcapng.tls_key_label.TLSKeyLabel`) mints on
304304 any path, so no live witness exists in this tree.
305305 :class:`~pcapkit.const.mh.cga_type.CGAType`, which still mints directly
306- via :func:`~ aenum.extend_enum`, is :class:`int`-valued, so
306+ via `` aenum.extend_enum` `, is :class:`int`-valued, so
307307 a ``str`` name could not reach its mint branch even if this restriction
308308 did not exist; it is not an exception to it, just not reachable by it.
309309 This is about a future ``str``-valued registry (or a present one whose
@@ -390,7 +390,7 @@ def get(cls, key: 'Any', default: 'Any' = NO_DEFAULT) -> 'Self':
390390 typically :exc:`~pcapkit.utilities.exceptions.EnumValueError` from a
391391 subclass's :meth:`_validate_value` -- is re-raised as it stands rather
392392 than wrapped, so the subclass's own message survives and no second
393- error is constructed. Only :mod:` aenum`'s and :mod:`enum`'s own "no
393+ error is constructed. Only `` aenum` `'s and :mod:`enum`'s own "no
394394 member carries this value" is converted, into a quiet
395395 :exc:`~pcapkit.utilities.exceptions.EnumValueError`. This is the same
396396 discrimination :meth:`EnumField.post_process
@@ -520,8 +520,8 @@ def register(cls, value: 'Any', name: 'str') -> 'Self':
520520 Contrast :meth:`get` and ``_missing_``, which resolve without naming anything.
521521
522522 Refuses a ``value`` that already has a member. Without this guard,
523- :func:`~ aenum.extend_enum` does not mint anything for an already-taken
524- value -- :mod:` aenum` treats that as a request to *alias* the existing
523+ `` aenum.extend_enum` ` does not mint anything for an already-taken
524+ value -- `` aenum` ` treats that as a request to *alias* the existing
525525 member under the caller's ``name`` instead, silently: the call returns
526526 the *existing* member, ``name`` becomes reachable in ``__members__``
527527 pointing at it, and ``_member_names_`` does not grow. That is
@@ -565,7 +565,7 @@ def register(cls, value: 'Any', name: 'str') -> 'Self':
565565 :meth:`~EnumLookup._validate_value` rejects ``value``. The base
566566 implementation of that hook accepts everything, so this cannot
567567 arise on a registry that does not override it.
568- ValueError: If ``name`` is already taken. :mod:` aenum` reports that
568+ ValueError: If ``name`` is already taken. `` aenum` ` reports that
569569 as :exc:`TypeError`; it is translated so that the ways one call
570570 can fail are one exception type.
571571
@@ -583,7 +583,7 @@ def register(cls, value: 'Any', name: 'str') -> 'Self':
583583
584584 @classmethod
585585 def _extend (cls , value : 'Any' , name : 'str' ) -> 'Self' :
586- """The raw :func:`~ aenum.extend_enum` call, shared by :meth:`register`
586+ """The raw `` aenum.extend_enum` ` call, shared by :meth:`register`
587587 and :meth:`register_alias`.
588588
589589 Neither public method calls the other: :meth:`register` refuses an
@@ -603,7 +603,7 @@ def _extend(cls, value: 'Any', name: 'str') -> 'Self':
603603 The member now reachable under ``name``, new or existing.
604604
605605 Raises:
606- ValueError: If ``name`` is already taken. :mod:` aenum` reports that
606+ ValueError: If ``name`` is already taken. `` aenum` ` reports that
607607 as :exc:`TypeError`; it is translated so that the ways one call
608608 can fail are one exception type.
609609
@@ -642,7 +642,7 @@ def register_alias(cls, value: 'Any', name: 'str') -> 'Self':
642642 :meth:`register_alias` test ``value``'s membership for opposite
643643 outcomes, so neither can be the other's implementation.
644644 ``AppType``'s override differs: it mints a real member through
645- :func:`~ aenum.extend_enum`, so its iteration grows too.
645+ `` aenum.extend_enum` `, so its iteration grows too.
646646
647647 Args:
648648 value: Value of the existing member to alias.
@@ -674,7 +674,7 @@ def register_aliases(cls, value: 'Any', *names: 'str') -> 'tuple[Self, ...]':
674674
675675 Raises:
676676 ValueError: As :meth:`register_alias`. Names before the failing one
677- stay registered -- :func:`~ aenum.extend_enum` has no transaction
677+ stay registered -- `` aenum.extend_enum` ` has no transaction
678678 to roll back, and undoing it by hand would mean reaching further
679679 into enumeration internals than anything else here does.
680680
@@ -691,7 +691,7 @@ def _unregistered_member(cls, value: 'Any', name: 'str') -> 'Self':
691691 that does.
692692
693693 The member is constructed through ``cls._member_type_``, which
694- :mod:` aenum` sets from the enumeration base, so this serves ``int``- and
694+ `` aenum` ` sets from the enumeration base, so this serves ``int``- and
695695 ``str``-valued registries alike without either having to say which it
696696 is.
697697
0 commit comments