Skip to content

Add py.typed marker and complete type annotations#124

Merged
ad-m merged 2 commits intomasterfrom
add-py-typed-and-type-hints
Mar 7, 2026
Merged

Add py.typed marker and complete type annotations#124
ad-m merged 2 commits intomasterfrom
add-py-typed-and-type-hints

Conversation

@ad-m
Copy link
Owner

@ad-m ad-m commented Mar 7, 2026

Summary

  • Add PEP 561 py.typed marker file so type checkers (mypy, pyright) recognize the package as typed
  • Add [tool.setuptools.package-data] in pyproject.toml to include py.typed in distributions
  • Complete type annotations: context manager methods (__enter__, __exit__, close), createTask/createTaskSmee (task: BaseTask instead of Any), and exception subclass constructors

Test plan

  • All 77 existing tests pass
  • Verify py.typed is included in built wheel (unzip -l dist/*.whl | grep py.typed)
  • Run mypy/pyright against the package to confirm types are picked up

🤖 Generated with Claude Code

Adam Dobrawy and others added 2 commits March 7, 2026 14:18
Add PEP 561 py.typed marker so type checkers (mypy, pyright) recognize
the package as typed. Complete type annotations for all public methods
missing them: context manager protocol, createTask/createTaskSmee
parameter types, and exception subclass constructors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The task class `type` attributes conflict with the builtin `type` used
in type annotations, causing an ambiguous cross-reference warning that
fails the -W docs build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ad-m ad-m merged commit 5a20a34 into master Mar 7, 2026
6 of 7 checks passed
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.

1 participant