From 1e82e49fe570e3ab4883dff03803b3dcb72897d6 Mon Sep 17 00:00:00 2001 From: Jarry Shaw Date: Sun, 25 Oct 2026 00:51:04 -0400 Subject: [PATCH] docs(corekit): fifth whole-repo pass over corekit, const and vendor (#1103) - Correct the module directives of the HIP vendor crawlers and of mn_group_id, and the class the MH status-code crawler generates. - Name can_seek in the corekit.io module docstring; describe how OptionField's option_padding reaches the packet; fix the HIP vendor page's opening and the NGAP vendor page's pointer to a docstring the page does not render. - Cite the protocols registry seeding by name, not file:line; point the pcapng and vlan request() docstrings at their own LINK; drop PR-timed context from vendor comments. - Grammar and typo fixes across corekit and vendor. Prose only: every changed .py keeps its AST once docstrings are removed. --- docs/source/pcapkit/vendor/hip.rst | 2 +- docs/source/pcapkit/vendor/ngap.rst | 5 +++-- pcapkit/const/__init__.py | 2 +- pcapkit/corekit/decorators.py | 10 +++++----- pcapkit/corekit/fields/collections.py | 10 ++++++---- pcapkit/corekit/fields/misc.py | 3 ++- pcapkit/corekit/infoclass.py | 10 +++++----- pcapkit/corekit/io.py | 3 ++- pcapkit/corekit/packet.py | 8 +++++--- pcapkit/vendor/__init__.py | 6 +++--- pcapkit/vendor/__main__.py | 9 ++++----- pcapkit/vendor/default.py | 6 +++--- pcapkit/vendor/hip/__init__.py | 2 +- pcapkit/vendor/hip/certificate.py | 2 +- pcapkit/vendor/hip/cipher.py | 2 +- pcapkit/vendor/hip/di.py | 2 +- pcapkit/vendor/hip/ecdsa_curve.py | 2 +- pcapkit/vendor/hip/ecdsa_low_curve.py | 2 +- pcapkit/vendor/hip/eddsa_curve.py | 2 +- pcapkit/vendor/hip/esp_transform_suite.py | 2 +- pcapkit/vendor/hip/group.py | 2 +- pcapkit/vendor/hip/hi_algorithm.py | 2 +- pcapkit/vendor/hip/hit_suite.py | 2 +- pcapkit/vendor/hip/nat_traversal.py | 2 +- pcapkit/vendor/hip/notify_message.py | 2 +- pcapkit/vendor/hip/packet.py | 2 +- pcapkit/vendor/hip/parameter.py | 2 +- pcapkit/vendor/hip/registration.py | 2 +- pcapkit/vendor/hip/registration_failure.py | 2 +- pcapkit/vendor/hip/suite.py | 2 +- pcapkit/vendor/hip/transport.py | 2 +- pcapkit/vendor/ipv4/option_class.py | 2 +- pcapkit/vendor/ipx/packet.py | 2 +- pcapkit/vendor/ipx/socket.py | 6 +++--- pcapkit/vendor/mh/mn_group_id.py | 2 +- pcapkit/vendor/mh/status_code.py | 2 +- pcapkit/vendor/ngap/procedure_code.py | 2 +- pcapkit/vendor/ngap/protocol_ie.py | 2 +- pcapkit/vendor/pcapng/block_type.py | 2 +- pcapkit/vendor/pcapng/option_type.py | 2 +- pcapkit/vendor/pcapng/record_type.py | 2 +- pcapkit/vendor/vlan/priority_level.py | 2 +- 42 files changed, 72 insertions(+), 66 deletions(-) diff --git a/docs/source/pcapkit/vendor/hip.rst b/docs/source/pcapkit/vendor/hip.rst index 5fa76bd75b..ae103eb796 100644 --- a/docs/source/pcapkit/vendor/hip.rst +++ b/docs/source/pcapkit/vendor/hip.rst @@ -4,7 +4,7 @@ .. module:: pcapkit.vendor.hip -This module contains all constant enumerations of +This module contains all vendor crawlers of :class:`~pcapkit.protocols.internet.hip.HIP` implementations. Available vendor crawlers include: diff --git a/docs/source/pcapkit/vendor/ngap.rst b/docs/source/pcapkit/vendor/ngap.rst index f8c78ecf05..70dded6c85 100644 --- a/docs/source/pcapkit/vendor/ngap.rst +++ b/docs/source/pcapkit/vendor/ngap.rst @@ -16,8 +16,9 @@ vendor crawlers include: - NGAP Protocol IE Identifiers [*]_ Each sources the assignment from |pycrate|_'s already-installed, compiled NGAP -specification rather than fetching a network registry -- see the module -docstring below for why. +specification rather than fetching a network registry: 3GPP publishes TS 38.413 +as a PDF, with no registry kept in step with it that a crawler could fetch +(:issue:`880`). NGAP Elementary Procedure Codes =============================== diff --git a/pcapkit/const/__init__.py b/pcapkit/const/__init__.py index 20a06e7f60..f1aeee3fc5 100644 --- a/pcapkit/const/__init__.py +++ b/pcapkit/const/__init__.py @@ -11,7 +11,7 @@ # IANA registration from pcapkit.const.reg import * -# Miscellanous +# Miscellaneous from pcapkit.const.pcapng import * # per protocol diff --git a/pcapkit/corekit/decorators.py b/pcapkit/corekit/decorators.py index bb85b065eb..730802bc4a 100644 --- a/pcapkit/corekit/decorators.py +++ b/pcapkit/corekit/decorators.py @@ -61,12 +61,12 @@ def seekset(func: 'Callable[Concatenate[ProtocolBase, P], R_seekset]') -> 'Calla This decorator function is designed for decorating *instance methods*. The decorator will keep the current offset of :attr:`self._file `, - then call the decorated function. Afterwards, it will rewind the offset of - :attr:`self._file ` to the original and returns the return value from + then call the decorated function. Afterwards, it will rewind the offset of + :attr:`self._file ` to the original and return the return value from the decorated function. Note: - The decorated function should have following signature:: + The decorated function should have the following signature:: func(self: 'pcapkit.protocols.protocol.ProtocolBase', *args: 'typing.Any', **kwargs: 'typing.Any') -> 'typing.Any' @@ -110,7 +110,7 @@ def beholder( end-of-file :exc:`~pcapkit.utilities.exceptions.StructError`. Note: - The decorated function should have following signature:: + The decorated function should have the following signature:: func(self: 'pcapkit.protocols.protocol.ProtocolBase', proto: 'int', length: 'typing.Optional[int]', @@ -218,7 +218,7 @@ def prepare(func: 'Callable[Concatenate[Type[R_prepare], bytes | IO[bytes], Opti the revised version of parameter list to the original method. Note: - The decorated function should have following signature:: + The decorated function should have the following signature:: func(cls: 'typing.Type[pcapkit.protocols.schema.schema.Schema]', data: 'bytes | typing.IO[bytes]', diff --git a/pcapkit/corekit/fields/collections.py b/pcapkit/corekit/fields/collections.py index 20b5a0ad95..cd77c75bfb 100644 --- a/pcapkit/corekit/fields/collections.py +++ b/pcapkit/corekit/fields/collections.py @@ -336,7 +336,7 @@ def eool(self) -> 'int | StdlibEnum | AenumEnum': @property def option_padding(self) -> 'int': - """Length option padding data.""" + """Length of option padding data.""" return self._option_padding def __init__(self, length: 'int | Callable[[dict[str, Any]], int]' = lambda _: -1, @@ -402,9 +402,11 @@ def unpack(self, buffer: 'bytes | IO[bytes]', packet: 'dict[str, Any]') -> 'list Important: If the option list ended before the specified size limit, - set :attr:`self.option_padding ` - as the remaining length to the ``packet`` argument such that - the next fields can be aware of such informations. + :attr:`self.option_padding ` is set + to the remaining length, which :meth:`Schema.unpack + ` records in + ``packet`` as ``__option_padding__`` so that the next fields can + be aware of it. Raises: FieldValueError: If an option consumes nothing from ``buffer``, since diff --git a/pcapkit/corekit/fields/misc.py b/pcapkit/corekit/fields/misc.py index b92a5c0e31..8492d9d8f3 100644 --- a/pcapkit/corekit/fields/misc.py +++ b/pcapkit/corekit/fields/misc.py @@ -278,7 +278,8 @@ def protocol(self, protocol: 'Type[_TP] | str') -> 'None': from pcapkit.protocols import __proto__ # pylint: disable=import-outside-toplevel # NOTE: The registry is keyed on the upper-cased class name, both - # when it is seeded (``pcapkit/protocols/__init__.py:76``) and when + # when it is seeded (the loop over ``__all__`` in + # :mod:`pcapkit.protocols`) and when # ``pcapkit.foundation.registry.protocols.register_protocol`` adds to # it, so a name looked up in any other case would miss every time -- # and a miss leaves ``_protocol`` as :obj:`None`, which the property diff --git a/pcapkit/corekit/infoclass.py b/pcapkit/corekit/infoclass.py index 8fdf3ed89c..9026cfebcd 100644 --- a/pcapkit/corekit/infoclass.py +++ b/pcapkit/corekit/infoclass.py @@ -267,9 +267,9 @@ class InfoMeta(abc.ABCMeta): .. note:: This is implemented thru the :meth:`__new__` method, which will - inherit the additional and excluded field names from the base - classes, as well as populating the additional and excluded field - from the subclass attributes. + inherit the additional, excluded and included field names from the + base classes, as well as populating the additional, excluded and + included fields from the subclass attributes. .. code-block:: python @@ -747,9 +747,9 @@ def to_dict(self) -> 'OrderedMultiDict[str, VT]': Important: We only convert nested :class:`Info` objects into :obj:`dict` if they are the direct value of the :class:`Info` object's attribute. - Should such :class:`Info` objects be nested within other data, + Should such :class:`Info` objects be nested within other data types, such as :obj:`list`, :obj:`tuple`, :obj:`set`, etc., we - shall not convert them into :obj:`dict` and remain them intact. + leave them intact rather than converting them into :obj:`dict`. Note: :meth:`from_dict` reverses the flattening only for keys whose type diff --git a/pcapkit/corekit/io.py b/pcapkit/corekit/io.py index 0f6923f74a..a9da1623a0 100644 --- a/pcapkit/corekit/io.py +++ b/pcapkit/corekit/io.py @@ -10,7 +10,8 @@ :class:`~pcapkit.corekit.io.PeekableStream`, which adds ``peek`` to a seekable stream, and :class:`~pcapkit.corekit.io.NamedStream`, which gives a stream a ``name``, as well as :func:`~pcapkit.corekit.io.advance`, which moves -a stream past more octets than one read or seek can take. +a stream past more octets than one read or seek can take, and +:func:`~pcapkit.corekit.io.can_seek`, which tells whether a stream really seeks. """ import io diff --git a/pcapkit/corekit/packet.py b/pcapkit/corekit/packet.py index 0c508d936d..6afb4fc83b 100644 --- a/pcapkit/corekit/packet.py +++ b/pcapkit/corekit/packet.py @@ -172,9 +172,11 @@ def to_dict(self) -> 'dict[str, Any]': """Convert the instance into :obj:`dict`. Returns: - The fields, with ``packet`` resolved if it had not been read yet -- - a :obj:`dict` holding the placeholder would leak an implementation - detail into what is meant to be plain data. + The fields, as :meth:`Info.to_dict + ` exports them, with + ``packet`` resolved if it had not been read yet -- an export + holding the placeholder would leak an implementation detail into + what is meant to be plain data. """ self.__analyse__() diff --git a/pcapkit/vendor/__init__.py b/pcapkit/vendor/__init__.py index dcd0589388..0e2d4b698f 100644 --- a/pcapkit/vendor/__init__.py +++ b/pcapkit/vendor/__init__.py @@ -5,8 +5,8 @@ .. module:: pcapkit.vendor -This module contains all web crawlers of :mod:`pcapkit`, which are -automatically generating the :mod:`pcapkit.const` module's constant +This module contains all web crawlers of :mod:`pcapkit`, which +automatically generate the :mod:`pcapkit.const` module's constant enumerations. The crawlers need the ``vendor`` extra, ``pip install "pypcapkit[vendor]"``. @@ -101,7 +101,7 @@ def __getattr__(name: 'str') -> 'typing.NoReturn': # IANA registration from pcapkit.vendor.reg import * - # Miscellanous + # Miscellaneous from pcapkit.vendor.pcapng import * # per protocol diff --git a/pcapkit/vendor/__main__.py b/pcapkit/vendor/__main__.py index 4e607dd1a0..a85cfe46cf 100644 --- a/pcapkit/vendor/__main__.py +++ b/pcapkit/vendor/__main__.py @@ -152,10 +152,9 @@ def _snapshot_and_restore(vendor: 'Type[Vendor]') -> 'Iterator[None]': # # The `else:` below is deliberate, not a style default pylint would # pick: collapsing it into an unindented statement after this whole - # `try` (as an earlier round of this same PR did) makes "cleanup - # only runs on success" a fact that has to be re-derived from - # "`raise` never falls through", rather than one the structure - # states directly -- and it silently stopped being true the moment + # `try` makes "cleanup only runs on success" a fact that has to be + # re-derived from "`raise` never falls through", rather than one the + # structure states directly -- and it silently stopped being true the moment # someone deleted that `raise`. A mutation test proved it: with the # `raise` gone, the unindented `os.remove(backup)` still ran, after # `os.replace` had already renamed the backup away, so it raised @@ -196,7 +195,7 @@ def run(vendor: 'Type[Vendor]') -> 'bool': # Unconditional, unlike the warning below: VendorRuntimeWarning is # filterable and VERBOSE defaults false, so without a plain print a CI # log that ignores warnings would show nothing at all about which - # target broke or why -- exactly the failure mode this fix exists for. + # target broke or why -- exactly the failure mode this print exists for. print(f'{vendor.__module__}.{vendor.__name__} failed: {error!r}', file=sys.stderr) warn(f'{vendor.__module__}.{vendor.__name__} <{error!r}>', VendorRuntimeWarning, stacklevel=2) return False diff --git a/pcapkit/vendor/default.py b/pcapkit/vendor/default.py index f2b5d5ac1f..097a9e773c 100644 --- a/pcapkit/vendor/default.py +++ b/pcapkit/vendor/default.py @@ -568,7 +568,7 @@ def _dest_path(cls) -> 'str': ``sys.exit(SomeCrawler())``, so running one from a second checkout, or from a module that never sits under ``vendor/`` at all, resolves :mod:`pcapkit.vendor` from wherever it is installed while - ``inspect.getfile(cls)`` names a file elsewhere entirely -- and + ``inspect.getfile(cls)`` names a file elsewhere entirely -- and :meth:`Vendor.__init__ ` then opens that path with ``'w'``, silently truncating whatever :attr:`~Vendor.__module__` actually names instead of raising. So the escape is rejected outright, rather than trusted to @@ -618,7 +618,7 @@ def _request(self) -> 'list[str]': arguments. The method will first try to *GET* the content of :attr:`~Vendor.LINK`. - Should any exception raised, it will first try with proxy settings from + Should any exception be raised, it will first try with proxy settings from :func:`~pcapkit.vendor.default.get_proxies`. .. note:: @@ -626,7 +626,7 @@ def _request(self) -> 'list[str]': Since some :attr:`~Vendor.LINK` links are from Wikipedia, etc., they might not be available in certain areas, e.g. the amazing PRC :) - Would proxies failed again, it will prompt for user intervention, i.e. + Should the proxies fail again, it will prompt for user intervention, i.e. it will use :func:`webbrowser.open` to open the page in browser for you, and you can manually load that page and save the HTML source at the location it provides. diff --git a/pcapkit/vendor/hip/__init__.py b/pcapkit/vendor/hip/__init__.py index 0adbe2009b..56bc378b1b 100644 --- a/pcapkit/vendor/hip/__init__.py +++ b/pcapkit/vendor/hip/__init__.py @@ -3,7 +3,7 @@ """:class:`~pcapkit.protocols.internet.hip.HIP` Vendor crawlers ======================================================================== -.. module:: pcapkit.const.hip +.. module:: pcapkit.vendor.hip This module contains all vendor crawlers of :class:`~pcapkit.protocols.internet.hip.HIP` implementations. Available diff --git a/pcapkit/vendor/hip/certificate.py b/pcapkit/vendor/hip/certificate.py index c398e96ce6..69be91f818 100644 --- a/pcapkit/vendor/hip/certificate.py +++ b/pcapkit/vendor/hip/certificate.py @@ -2,7 +2,7 @@ """HIP Certificate Types =========================== -.. module:: pcapkit.const.hip.certificate +.. module:: pcapkit.vendor.hip.certificate This module contains the vendor crawler for **HIP Certificate Types**, which is automatically generating :class:`pcapkit.const.hip.certificate.Certificate`. diff --git a/pcapkit/vendor/hip/cipher.py b/pcapkit/vendor/hip/cipher.py index 2c0dfac031..ab53268e8b 100644 --- a/pcapkit/vendor/hip/cipher.py +++ b/pcapkit/vendor/hip/cipher.py @@ -2,7 +2,7 @@ """Cipher IDs ================ -.. module:: pcapkit.const.hip.cipher +.. module:: pcapkit.vendor.hip.cipher This module contains the vendor crawler for **Cipher IDs**, which is automatically generating :class:`pcapkit.const.hip.cipher.Cipher`. diff --git a/pcapkit/vendor/hip/di.py b/pcapkit/vendor/hip/di.py index 11d92f8280..9c71efc13d 100644 --- a/pcapkit/vendor/hip/di.py +++ b/pcapkit/vendor/hip/di.py @@ -2,7 +2,7 @@ """DI-Types ============== -.. module:: pcapkit.const.hip.di +.. module:: pcapkit.vendor.hip.di This module contains the vendor crawler for **DI-Types**, which is automatically generating :class:`pcapkit.const.hip.di.DITypes`. diff --git a/pcapkit/vendor/hip/ecdsa_curve.py b/pcapkit/vendor/hip/ecdsa_curve.py index b0b3854afb..d6b87871f2 100644 --- a/pcapkit/vendor/hip/ecdsa_curve.py +++ b/pcapkit/vendor/hip/ecdsa_curve.py @@ -2,7 +2,7 @@ """ECDSA Curve Label ======================= -.. module:: pcapkit.const.hip.ecdsa_curve +.. module:: pcapkit.vendor.hip.ecdsa_curve This module contains the vendor crawler for **ECDSA Curve Label**, which is automatically generating :class:`pcapkit.const.hip.ecdsa_curve.ECDSACurve`. diff --git a/pcapkit/vendor/hip/ecdsa_low_curve.py b/pcapkit/vendor/hip/ecdsa_low_curve.py index 05383ec0e3..3aec2ffe16 100644 --- a/pcapkit/vendor/hip/ecdsa_low_curve.py +++ b/pcapkit/vendor/hip/ecdsa_low_curve.py @@ -2,7 +2,7 @@ """ECDSA_LOW Curve Label =========================== -.. module:: pcapkit.const.hip.ecdsa_low_curve +.. module:: pcapkit.vendor.hip.ecdsa_low_curve This module contains the vendor crawler for **ECDSA_LOW Curve Label**, which is automatically generating :class:`pcapkit.const.hip.ecdsa_low_curve.ECDSALowCurve`. diff --git a/pcapkit/vendor/hip/eddsa_curve.py b/pcapkit/vendor/hip/eddsa_curve.py index 5c3c0e9ae6..d15aa5f5bd 100644 --- a/pcapkit/vendor/hip/eddsa_curve.py +++ b/pcapkit/vendor/hip/eddsa_curve.py @@ -2,7 +2,7 @@ """EdDSA Curve Label =========================== -.. module:: pcapkit.const.hip.eddsa_curve +.. module:: pcapkit.vendor.hip.eddsa_curve This module contains the vendor crawler for **EdDSA Curve Label**, which is automatically generating :class:`pcapkit.const.hip.eddsa_curve.EdDSACurve`. diff --git a/pcapkit/vendor/hip/esp_transform_suite.py b/pcapkit/vendor/hip/esp_transform_suite.py index 2a7b5cd291..2eaaab9685 100644 --- a/pcapkit/vendor/hip/esp_transform_suite.py +++ b/pcapkit/vendor/hip/esp_transform_suite.py @@ -2,7 +2,7 @@ """ESP Transform Suite IDs ============================= -.. module:: pcapkit.const.hip.esp_transform_suite +.. module:: pcapkit.vendor.hip.esp_transform_suite This module contains the vendor crawler for **ESP Transform Suite IDs**, which is automatically generating :class:`pcapkit.const.hip.esp_transform_suite.ESPTransformSuite`. diff --git a/pcapkit/vendor/hip/group.py b/pcapkit/vendor/hip/group.py index 2340253eef..e83fedebfb 100644 --- a/pcapkit/vendor/hip/group.py +++ b/pcapkit/vendor/hip/group.py @@ -2,7 +2,7 @@ """Group IDs =============== -.. module:: pcapkit.const.hip.group +.. module:: pcapkit.vendor.hip.group This module contains the vendor crawler for **Group IDs**, which is automatically generating :class:`pcapkit.const.hip.group.Group`. diff --git a/pcapkit/vendor/hip/hi_algorithm.py b/pcapkit/vendor/hip/hi_algorithm.py index c290529952..144dd02624 100644 --- a/pcapkit/vendor/hip/hi_algorithm.py +++ b/pcapkit/vendor/hip/hi_algorithm.py @@ -2,7 +2,7 @@ """HI Algorithm ================== -.. module:: pcapkit.const.hip.hi_algorithm +.. module:: pcapkit.vendor.hip.hi_algorithm This module contains the vendor crawler for **HI Algorithm**, which is automatically generating :class:`pcapkit.const.hip.hi_algorithm.HIAlgorithm`. diff --git a/pcapkit/vendor/hip/hit_suite.py b/pcapkit/vendor/hip/hit_suite.py index 7735f6df79..e2a2f31eab 100644 --- a/pcapkit/vendor/hip/hit_suite.py +++ b/pcapkit/vendor/hip/hit_suite.py @@ -2,7 +2,7 @@ """HIT Suite ID ================== -.. module:: pcapkit.const.hip.hit_suite +.. module:: pcapkit.vendor.hip.hit_suite This module contains the vendor crawler for **HIT Suite ID**, which is automatically generating :class:`pcapkit.const.hip.hit_suite.HITSuite`. diff --git a/pcapkit/vendor/hip/nat_traversal.py b/pcapkit/vendor/hip/nat_traversal.py index 7a256ee62f..2aab4cb51f 100644 --- a/pcapkit/vendor/hip/nat_traversal.py +++ b/pcapkit/vendor/hip/nat_traversal.py @@ -2,7 +2,7 @@ """HIP NAT Traversal Modes ============================= -.. module:: pcapkit.const.hip.nat_traversal +.. module:: pcapkit.vendor.hip.nat_traversal This module contains the vendor crawler for **HIP NAT Traversal Modes**, which is automatically generating :class:`pcapkit.const.hip.nat_traversal.NATTraversal`. diff --git a/pcapkit/vendor/hip/notify_message.py b/pcapkit/vendor/hip/notify_message.py index 74e0e9cfe5..d2e17bc86c 100644 --- a/pcapkit/vendor/hip/notify_message.py +++ b/pcapkit/vendor/hip/notify_message.py @@ -2,7 +2,7 @@ """Notify Message Types ========================== -.. module:: pcapkit.const.hip.notify_message +.. module:: pcapkit.vendor.hip.notify_message This module contains the vendor crawler for **Notify Message Types**, which is automatically generating :class:`pcapkit.const.hip.notify_message.NotifyMessage`. diff --git a/pcapkit/vendor/hip/packet.py b/pcapkit/vendor/hip/packet.py index 1082bbe16f..44cfde4cd3 100644 --- a/pcapkit/vendor/hip/packet.py +++ b/pcapkit/vendor/hip/packet.py @@ -2,7 +2,7 @@ """HIP Packet Types ====================== -.. module:: pcapkit.const.hip.packet +.. module:: pcapkit.vendor.hip.packet This module contains the vendor crawler for **HIP Packet Types**, which is automatically generating :class:`pcapkit.const.hip.packet.Packet`. diff --git a/pcapkit/vendor/hip/parameter.py b/pcapkit/vendor/hip/parameter.py index 7d71695a17..c526e6a0c5 100644 --- a/pcapkit/vendor/hip/parameter.py +++ b/pcapkit/vendor/hip/parameter.py @@ -2,7 +2,7 @@ """HIP Parameter Types ========================= -.. module:: pcapkit.const.hip.parameter +.. module:: pcapkit.vendor.hip.parameter This module contains the vendor crawler for **HIP Parameter Types**, which is automatically generating :class:`pcapkit.const.hip.parameter.Parameter`. diff --git a/pcapkit/vendor/hip/registration.py b/pcapkit/vendor/hip/registration.py index c96a561b48..2f2b3a1a27 100644 --- a/pcapkit/vendor/hip/registration.py +++ b/pcapkit/vendor/hip/registration.py @@ -2,7 +2,7 @@ """Registration Types ======================== -.. module:: pcapkit.const.hip.registration +.. module:: pcapkit.vendor.hip.registration This module contains the vendor crawler for **Registration Types**, which is automatically generating :class:`pcapkit.const.hip.registration.Registration`. diff --git a/pcapkit/vendor/hip/registration_failure.py b/pcapkit/vendor/hip/registration_failure.py index d781f183f8..4ed59a42f9 100644 --- a/pcapkit/vendor/hip/registration_failure.py +++ b/pcapkit/vendor/hip/registration_failure.py @@ -2,7 +2,7 @@ """Registration Failure Types ================================ -.. module:: pcapkit.const.hip.registration_failure +.. module:: pcapkit.vendor.hip.registration_failure This module contains the vendor crawler for **Registration Failure Types**, which is automatically generating :class:`pcapkit.const.hip.registration_failure.RegistrationFailure`. diff --git a/pcapkit/vendor/hip/suite.py b/pcapkit/vendor/hip/suite.py index 5ad213ebb7..a223ce6223 100644 --- a/pcapkit/vendor/hip/suite.py +++ b/pcapkit/vendor/hip/suite.py @@ -2,7 +2,7 @@ """Suite IDs =============== -.. module:: pcapkit.const.hip.suite +.. module:: pcapkit.vendor.hip.suite This module contains the vendor crawler for **Suite IDs**, which is automatically generating :class:`pcapkit.const.hip.suite.Suite`. diff --git a/pcapkit/vendor/hip/transport.py b/pcapkit/vendor/hip/transport.py index 6f8d52c868..558e7c91cb 100644 --- a/pcapkit/vendor/hip/transport.py +++ b/pcapkit/vendor/hip/transport.py @@ -2,7 +2,7 @@ """HIP Transport Modes ========================= -.. module:: pcapkit.const.hip.transport +.. module:: pcapkit.vendor.hip.transport This module contains the vendor crawler for **HIP Transport Modes**, which is automatically generating :class:`pcapkit.const.hip.transport.Transport`. diff --git a/pcapkit/vendor/ipv4/option_class.py b/pcapkit/vendor/ipv4/option_class.py index ed504113eb..22dbca0a14 100644 --- a/pcapkit/vendor/ipv4/option_class.py +++ b/pcapkit/vendor/ipv4/option_class.py @@ -32,7 +32,7 @@ class OptionClass(Vendor): """Option Classes""" - #: Value limit checker.s + #: Value limit checker. FLAG = 'isinstance(value, int) and 0 <= value <= 3' def request(self) -> 'dict[int, str]': # type: ignore[override] # pylint: disable=arguments-differ diff --git a/pcapkit/vendor/ipx/packet.py b/pcapkit/vendor/ipx/packet.py index 0429758bf9..c51ef76bc4 100644 --- a/pcapkit/vendor/ipx/packet.py +++ b/pcapkit/vendor/ipx/packet.py @@ -11,7 +11,7 @@ """ ############################################################################### -# NOTE: fix duplicated name of ``socket``` +# NOTE: fix duplicated name of ``socket`` import sys path = sys.path.pop(0) diff --git a/pcapkit/vendor/ipx/socket.py b/pcapkit/vendor/ipx/socket.py index 20a5e6cb4d..ab2078fd64 100644 --- a/pcapkit/vendor/ipx/socket.py +++ b/pcapkit/vendor/ipx/socket.py @@ -11,7 +11,7 @@ """ ############################################################################### -# NOTE: fix duplicated name of ``socket``` +# NOTE: fix duplicated name of ``socket`` import sys path = sys.path.pop(0) @@ -129,8 +129,8 @@ # :rfc:`1362` line 253 with "information exchange" for "protocol exchange". # So they are known omissions with good sourcing, not rows nobody noticed. # Adding them would add members to the generated file and so give up the - # byte-identity proof this change rests on, which makes them a follow-up - # rather than part of #507. + # byte-identity proof #507 rests on, which makes them a follow-up rather + # than part of it. # # Some of the rows below also depart from Novell's own wording: Novell writes # "Novell NetBIOS" and "Diagnostics" where this table says "NetBIOS" and diff --git a/pcapkit/vendor/mh/mn_group_id.py b/pcapkit/vendor/mh/mn_group_id.py index 0b8a251d0f..e4c1149912 100644 --- a/pcapkit/vendor/mh/mn_group_id.py +++ b/pcapkit/vendor/mh/mn_group_id.py @@ -2,7 +2,7 @@ """Mobile Node Group Identifier Type Registry ================================================ -.. module:: pcapkit.vendor.mh.mh_group_id +.. module:: pcapkit.vendor.mh.mn_group_id This module contains the vendor crawler for **Mobile Node Group Identifier Type Registry**, which is automatically generating :class:`pcapkit.const.mh.mn_group_id.MNGroupID`. diff --git a/pcapkit/vendor/mh/status_code.py b/pcapkit/vendor/mh/status_code.py index c9b14e49ed..6e36e49af1 100644 --- a/pcapkit/vendor/mh/status_code.py +++ b/pcapkit/vendor/mh/status_code.py @@ -5,7 +5,7 @@ .. module:: pcapkit.vendor.mh.status_code This module contains the vendor crawler for **Status Codes**, -which is automatically generating :class:`pcapkit.const.mh.dns_status_code.DNSStatusCode`. +which is automatically generating :class:`pcapkit.const.mh.status_code.StatusCode`. """ diff --git a/pcapkit/vendor/ngap/procedure_code.py b/pcapkit/vendor/ngap/procedure_code.py index 6a55a33702..ce52e7cdac 100644 --- a/pcapkit/vendor/ngap/procedure_code.py +++ b/pcapkit/vendor/ngap/procedure_code.py @@ -53,7 +53,7 @@ #: directly rather than through a public accessor. _TYPEREF = ('NGAP-CommonDataTypes', 'ProcedureCode') -#: Default constant template of enumerate registry, sourced from pycrate +#: Default constant template of enumeration registry, sourced from pycrate #: rather than an IANA CSV -- see the module docstring. LINE = lambda NAME, DOCS, FLAG, ENUM, MODL: f'''\ # -*- coding: utf-8 -*- diff --git a/pcapkit/vendor/ngap/protocol_ie.py b/pcapkit/vendor/ngap/protocol_ie.py index a232314cb2..dd2a748a2c 100644 --- a/pcapkit/vendor/ngap/protocol_ie.py +++ b/pcapkit/vendor/ngap/protocol_ie.py @@ -36,7 +36,7 @@ #: accessor. _TYPEREF = ('NGAP-CommonDataTypes', 'ProtocolIE-ID') -#: Default constant template of enumerate registry, sourced from pycrate +#: Default constant template of enumeration registry, sourced from pycrate #: rather than an IANA CSV -- see :mod:`pcapkit.vendor.ngap.procedure_code`. LINE = lambda NAME, DOCS, FLAG, ENUM, MODL: f'''\ # -*- coding: utf-8 -*- diff --git a/pcapkit/vendor/pcapng/block_type.py b/pcapkit/vendor/pcapng/block_type.py index 97cbfae14e..4de323e194 100644 --- a/pcapkit/vendor/pcapng/block_type.py +++ b/pcapkit/vendor/pcapng/block_type.py @@ -83,7 +83,7 @@ def request(self, text: 'str') -> 'list[Tag]': # type: ignore[override] # pylin """Fetch registry table. Args: - text: Context from :attr:`~LinkType.LINK`. + text: Context from :attr:`~BlockType.LINK`. Returns: Rows (``tr``) from registry table (``table``). diff --git a/pcapkit/vendor/pcapng/option_type.py b/pcapkit/vendor/pcapng/option_type.py index 033fcc5581..48dcd62871 100644 --- a/pcapkit/vendor/pcapng/option_type.py +++ b/pcapkit/vendor/pcapng/option_type.py @@ -364,7 +364,7 @@ def request(self, text: 'str') -> 'dict[str, list[Tag]]': # type: ignore[overri """Fetch registry table. Args: - text: Context from :attr:`~LinkType.LINK`. + text: Context from :attr:`~OptionType.LINK`. Returns: Rows (``tr``) from registry table (``table``). diff --git a/pcapkit/vendor/pcapng/record_type.py b/pcapkit/vendor/pcapng/record_type.py index c4b9aa1951..3c23ab570a 100644 --- a/pcapkit/vendor/pcapng/record_type.py +++ b/pcapkit/vendor/pcapng/record_type.py @@ -42,7 +42,7 @@ def request(self, text: 'str') -> 'list[Tag]': # type: ignore[override] # pylin """Fetch registry table. Args: - text: Context from :attr:`~LinkType.LINK`. + text: Context from :attr:`~RecordType.LINK`. Returns: Rows (``tr``) from registry table (``table``). diff --git a/pcapkit/vendor/vlan/priority_level.py b/pcapkit/vendor/vlan/priority_level.py index cfb450a5a3..f382f812aa 100644 --- a/pcapkit/vendor/vlan/priority_level.py +++ b/pcapkit/vendor/vlan/priority_level.py @@ -38,7 +38,7 @@ def request(self, text: 'str') -> 'BeautifulSoup': # type: ignore[override] # p """Fetch registry table. Args: - text: Context from :attr:`~LinkType.LINK`. + text: Context from :attr:`~PriorityLevel.LINK`. Returns: Parsed HTML source.