Add py.typed marker for PEP 561 type checking support#75
Closed
orborde wants to merge 1 commit intocolour-science:masterfrom
Closed
Add py.typed marker for PEP 561 type checking support#75orborde wants to merge 1 commit intocolour-science:masterfrom
orborde wants to merge 1 commit intocolour-science:masterfrom
Conversation
Without a py.typed marker, mypy skips analyzing flask_compress with the error "module is installed, but missing library stubs or py.typed marker [import-untyped]". Adding the marker declares PEP 561 compliance so mypy will process the package's inline types. https://claude.ai/code/session_01PDkg6syU6fe15ngPYLPoyT
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.
This PR adds PEP 561 type checking support to flask-compress by including a
py.typedmarker file in the package distribution.Summary
Added the
py.typedmarker file to indicate that flask-compress supports inline type hints and is compatible with static type checkers like mypy, pyright, and other PEP 561-compliant tools.Changes
flask_compress/py.typedmarker file (empty file as per PEP 561 specification)setup.pyto includepy.typedin package data so it's distributed with the packageDetails
The
py.typedmarker file signals to type checkers that this package contains inline type annotations and should be used for type checking. This is a standard practice for typed Python packages and allows consumers of flask-compress to benefit from type hints when using the library in their projects.https://claude.ai/code/session_01PDkg6syU6fe15ngPYLPoyT