Skip to content

Add py.typed marker for PEP 561 compliance#29

Merged
fferflo merged 1 commit intofferflo:masterfrom
simondoesstuff:master
Mar 20, 2026
Merged

Add py.typed marker for PEP 561 compliance#29
fferflo merged 1 commit intofferflo:masterfrom
simondoesstuff:master

Conversation

@simondoesstuff
Copy link
Copy Markdown
Contributor

Summary

  • Add empty py.typed marker file to the package
  • Configure setuptools to include it in the wheel distribution

Problem

Type checkers (pyright, mypy, basedpyright) report "Stub file not found for einx" because the package is missing the https://peps.python.org/pep-0561/ py.typed marker file.
This happens despite einx having inline type annotations.

Solution

Adding the py.typed marker signals to type checkers that einx is a typed package. The annotations already exist in the source—this just enables their discovery. The types are ignored without this.

Workaround (for users on older versions)

Until this is released, users can suppress the warning in pyproject.toml:

[tool.basedpyright]  # or [tool.pyright]
reportMissingTypeStubs = false

Or in pyrightconfig.json:

{
  "reportMissingTypeStubs": false
}

closes #28

Type checkers (pyright, mypy, basedpyright) require a py.typed marker
file to recognize that a package provides inline type annotations.
Without this file, users get "Stub file not found" warnings.
@fferflo fferflo merged commit f748190 into fferflo:master Mar 20, 2026
3 checks passed
@fferflo
Copy link
Copy Markdown
Owner

fferflo commented Mar 20, 2026

Thanks!

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.

stub file or type hints?

2 participants