Skip to content

make isort no longer reaches pcapkit/const/reg/apptype/__init__.py after the #754 split #765

Description

@JarryShaw

Describe the bug

make isort sorts __init__.py under pcapkit/const/ and pcapkit/vendor/ through a
two-level glob, pcapkit/{const,vendor}/*/*.py (Makefile:126). Since #754 split AppType
into a package, pcapkit/const/reg/apptype/__init__.py sits three levels down and that glob no
longer reaches it — and Makefile:125, which does recurse the whole tree, passes
--skip-glob '**/__init__.py'. So the file is sorted by no make isort line.

Reproduction

$ python -c "import glob; g=glob.glob('pcapkit/const/*/*.py')+glob.glob('pcapkit/vendor/*/*.py'); \
print(len(g), [p for p in g if 'apptype' in p])"
264 []

$ ls pcapkit/const/reg/apptype/
__init__.py  apptype.py  dccp.py  sctp.py  tcp.py  udp.py

Expected behavior

Every __init__.py under pcapkit/const/ and pcapkit/vendor/ is reached by make isort,
regardless of nesting depth.

Additional context

The file is isort-clean today, so nothing is currently broken — this is a latent hole that
would let it drift silently. pcapkit/const/reg/apptype/ is the only package of this shape at
present, so the blast radius is one file, but the glob will keep missing any future split.

Fix is either a recursive glob (pcapkit/{const,vendor}/**/*.py) or dropping the separate line
and narrowing :125's --skip-glob instead. Found while fixing #757/#753; related to #761,
which adds tests/project/test_isort_clean.py and inherits the same blind spot if it reuses the
Makefile's globs verbatim.

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

    bugciPull requests that change CI or workflow configuration (ci: subject prefix)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions