Skip to content
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

feat(mrml-python): add a Python types stub file #413

Merged
merged 2 commits into from
Apr 20, 2024

Conversation

blopker
Copy link

@blopker blopker commented Apr 19, 2024

Fix for #412

  • Add a types stub file for the Python package
  • Update and migrate to Py03 0.21.2

All the test files now lint correctly with Pylance in VSCode. 🎉

@@ -214,7 +214,7 @@ fn to_html(

#[pymodule]
#[pyo3(name = "mrml")]
fn register(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
fn register(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> {
Copy link
Author

Choose a reason for hiding this comment

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

The one breaking change in this file that affected PyO3 0.21

Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
@jdrouet
Copy link
Owner

jdrouet commented Apr 20, 2024

👍 Thanks for this, that's amazing!
I reorganized your commits and started the build but this looks good to merge when the CI will be ok with it.

@jdrouet jdrouet self-requested a review April 20, 2024 07:01
@jdrouet jdrouet changed the title Fix #412: Add a Python types stub file. Update to Py03 v0.21.2 feat(mrml-python): add a Python types stub file Apr 20, 2024
@jdrouet jdrouet merged commit a56fe68 into jdrouet:main Apr 20, 2024
9 checks passed
@blopker
Copy link
Author

blopker commented Apr 20, 2024

Great! Thanks for the merge. I think the doc strings leave some room for improvement, but good enough for now.

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