Skip to content

refactor(protocols): reorder application class members to the member-order convention (#2490) - #2522

Open
JarryShaw wants to merge 1 commit into
mainfrom
refactor/2490-member-order-application
Open

JarryShaw wants to merge 1 commit into
mainfrom
refactor/2490-member-order-application

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else
  • const — regenerates constant or registry tables, members keeping their numeric values

Description of your pull request and other information

Part of #2490. A pure reorder to protocol-member-order.rst, covering pcapkit/protocols/application/ftp.py. An AST check confirms the member set and every member body are unchanged; only the order differs. The narrow tests for each touched protocol pass. Files that other streams are editing now are deferred (DTLS, IGMPv3, IPX, OSPF, IPv4, TCP, SCTP, IP_Pseudo). Open questions about cases the page does not cover are posted on #2490.

…order convention (#2490)

- ftp: order the helpers read() and make() call directly by first use:
  _test_lines and _decode_args (read), then _make_code (make).

Pure move: member set, every member's AST and the comments are unchanged.
@JarryShaw JarryShaw added refactor Restructuring for its own sake — neither a fix nor a new capability (refactor: prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Nov 1, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Nov 1, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Cross-review (Sonnet) of all four #2490 branches, this one at 9200eb062: GOOD TO GO. The reviewer's own AST checker passes all 17 files: module-level statements are identical, and every class keeps the same member multiset with identical member ASTs and segments. The only non-reorder edits are the two section-banner fixes. Non-blocking: no guard test pins the convention yet, the subjects overstate it (rule c and registry-map ordering are not applied), and the rule-b reading of registry fallbacks is not stated on the page. All three are raised as questions on #2490.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Coverage: 93.94% (unit tier, Python 3.15, 9200eb062, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 20087 144 2710 125 98.78%
pcapkit/corekit 2605 74 818 37 96.52%
pcapkit/dumpkit 281 3 100 3 98.43%
pcapkit/foundation 3194 27 1112 31 98.65%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 19906 213 5236 207 98.32%
pcapkit/toolkit 924 36 334 10 95.55%
pcapkit/utilities 502 7 144 5 98.14%
pcapkit/vendor 5009 2222 1148 182 52.31%

Per-file detail: the coverage-html artifact of this run.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Restructuring for its own sake — neither a fix nor a new capability (refactor: prefix) review: good-to-go Cross-review at the current head says ready; CI state is separate

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant