Skip to content

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

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

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

    bugdocsPull requests that change documentation only (docs: subject prefix)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions