Skip to content

refactor: include package typing in distribution #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2025
Merged

Conversation

JuroOravec
Copy link
Contributor

Locally I've already installed the Rust impl into django-components, and it works. But the types are not showing up for djc-core-html-parser.

This should fix it, as py.typed and __init__.pyi are places such that they are inserted into the python package that maturin builds.

@@ -0,0 +1,9 @@
# DO NOT MODIFY, ONLY UPDATE THE MODULE NAME WHEN NEEDED!
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As mentioned here, this file was originally generated by maturin, but maturin skips it when it sees __init__.pyi.

It's possible that this is a bug on maturin's side that maybe it checks only for file name, but NOT for file extension. because I think __init__.pyi should NOT overwrite __init__.py.

Anyway, I thus included this file manually.

@JuroOravec
Copy link
Contributor Author

cc @EmilStenstrom

@JuroOravec JuroOravec merged commit 8884067 into main Jan 26, 2025
12 checks passed
@JuroOravec JuroOravec deleted the jo-fix-typing branch January 26, 2025 14:16
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