Repository navigation
[packaging] Add PEP 561 py.typed marker and explicit SceneManager re-export - #617
Merged
Merged
Conversation
…export Ship scenedetect/py.typed across both scenedetect and scenedetect-headless distributions, add the Typing :: Typed classifier, and use redundant-alias re-export for SceneManager in scenedetect/__init__.py so downstream mypy --strict consumers type-check cleanly.
MuhammadBilalKhan267
approved these changes
Nov 22, 2026
Breakthrough
approved these changes
Nov 22, 2026
Breakthrough
left a comment
Owner
There was a problem hiding this comment.
Thanks for the PR! I didn't know this was required, thanks for letting me know.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Downstream projects running
mypy --strictfail onfrom scenedetect import ContentDetector, detect(Skipping analyzing "scenedetect": module is installed, but missing library stubs or py.typed marker [import-untyped]) becausescenedetectomits a PEP 561scenedetect/py.typedmarker file. In addition, line 79 ofscenedetect/__init__.pyimportsSceneManagerwithout explicitas SceneManagerre-export syntax, which triggers[attr-defined]underno_implicit_reexportoncepy.typedis enabled.Reproduction
mypy --strict -c "from scenedetect import ContentDetector, SceneManager, detect"Fix and Verification
scenedetect/py.typedand register it inMANIFEST.inand[tool.setuptools.package-data]alongside the"Typing :: Typed"classifier acrosspyproject.toml,packaging/variants/pyproject-scenedetect.toml, andpackaging/variants/pyproject-scenedetect-headless.toml.scenedetect/__init__.pyto exportSceneManager as SceneManagermatching all other top-level re-exports.packaging/build_all.pythatscenedetect/py.typedis packaged inside all four built wheels and sdists, and verified downstreammypy --strictpasses with zero errors.