Skip to content

Add py.typed marker for PEP 561 type checking support#75

Closed
orborde wants to merge 1 commit intocolour-science:masterfrom
orborde:claude/fix-flask-compress-mypy-ORAw4
Closed

Add py.typed marker for PEP 561 type checking support#75
orborde wants to merge 1 commit intocolour-science:masterfrom
orborde:claude/fix-flask-compress-mypy-ORAw4

Conversation

@orborde
Copy link
Copy Markdown
Contributor

@orborde orborde commented Feb 23, 2026

This PR adds PEP 561 type checking support to flask-compress by including a py.typed marker file in the package distribution.

Summary

Added the py.typed marker 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

  • Created flask_compress/py.typed marker file (empty file as per PEP 561 specification)
  • Updated setup.py to include py.typed in package data so it's distributed with the package

Details

The py.typed marker 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

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
@orborde orborde closed this Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants