Skip to content

docs(foundation): extraction.py's engine-check comment cites an alias #750 removed #756

Closed

Description

@JarryShaw

Describe the bug

pcapkit/foundation/extraction.py:430-432 explains its issubclass(engine, EngineBase) check by citing a
code shape that no longer exists. #750 removed the alias it names.

Reproduction

The comment, on 73f09aecb:

# NOTE: checked against ``EngineBase`` rather than ``Engine``: every built-in
# engine subclasses the base directly (``engines/pcap.py`` imports it as
# ``EngineBase as Engine``) precisely so that it is *not* auto-registered by

But pcapkit/foundation/engines/pcap.py:13 reads from pcapkit.foundation.engines.engine import EngineBase, and :29 is class PCAP(EngineBase[Frame]). There is no as Engine anywhere in that file.

Expected behavior

The comment should cite the shape that is actually there. Its conclusion is still right — built-in
engines do subclass the base directly, which is why the check is against EngineBase — so only the
parenthetical is wrong.

System information

  • OS Version: Linux 5.10 (Amazon Linux 2 int)
  • Python Version: 3.14.7
  • Python Implementation: CPython
  • pcapkit Version: checkout at 73f09aecb

Additional context

Found while cross-reviewing #752. It is the Engine family, not the ProtocolBase family #752 touches,
and sits ~370 lines from that PR's nearest edit, so it was correctly left out rather than folded in.

Non-urgent: a comment, not logic, so nothing behaves wrongly. Worth fixing because it points a reader at
an alias that was deliberately removed — the same class of defect as a stale line-number citation, and #657
has spent eighteen review rounds on exactly that.

Activity

  1. added
    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)
    docsPull requests that change documentation only (docs: subject prefix)
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Sep 24, 2026
  2. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Sep 25, 2026
  3. added this to the 1.5 milestone on Oct 6, 2026
  4. moved this to Done in PyPCAPKiton Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)docsPull requests that change documentation only (docs: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions