Skip to content

chore: add type stubs#4

Merged
alesanfra merged 1 commit intomainfrom
feature/stubs
Feb 5, 2026
Merged

chore: add type stubs#4
alesanfra merged 1 commit intomainfrom
feature/stubs

Conversation

@alesanfra
Copy link
Owner

This should fix #2

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds PEP 561-compliant type stubs to enable type checking for the toons Python extension module, fixing issue #2 where type checkers like ty could not resolve module attributes. The changes include creating a .pyi stub file, configuring maturin to include it in distributions, bumping the package version, and updating the ruff pre-commit hook.

Changes:

  • Added toons.pyi type stub file with complete function signatures for load, loads, dump, and dumps
  • Configured maturin to include the type stub in package distributions
  • Bumped version from 0.5.0 to 0.5.1

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
toons.pyi New type stub file providing type hints for all public API functions with correct signatures matching the Rust implementation
pyproject.toml Added include = ["toons.pyi"] to maturin configuration to ensure type stubs are distributed with the package
Cargo.toml Version bumped from 0.5.0 to 0.5.1
Cargo.lock Lock file updated to reflect version 0.5.1
.pre-commit-config.yaml Updated ruff pre-commit hook from v0.14.10 to v0.15.0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alesanfra alesanfra merged commit 718bbe5 into main Feb 5, 2026
22 checks passed
@alesanfra alesanfra deleted the feature/stubs branch February 10, 2026 13:59
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.

Module toons has no member dumps

2 participants