Skip to content

fix: improve type stubs#137

Merged
terraputix merged 21 commits intomainfrom
improve-type-stubs
Apr 21, 2026
Merged

fix: improve type stubs#137
terraputix merged 21 commits intomainfrom
improve-type-stubs

Conversation

@terraputix
Copy link
Copy Markdown
Collaborator

@terraputix terraputix commented Apr 21, 2026

Summary

  • Switch several OmFileWriter Python-exposed parameters from Optional[...] to non-optional with explicit defaults via #[pyo3(signature=...)].
  • Improve/expand docstrings for array/scalar writing, and refine stub types for streaming inputs (Iterator[NDArray[Any]], numpy.dtype[Any]).
  • Adjust Rust tests to match the updated method signatures.

@terraputix terraputix marked this pull request as ready for review April 21, 2026 14:32
@terraputix terraputix requested a review from Copilot April 21, 2026 14:33
Copy link
Copy Markdown

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

Updates the Rust-exposed Python writer API signatures and documentation to produce more precise generated Python type stubs for OmFileWriter.

Changes:

  • Switch several OmFileWriter Python-exposed parameters from Optional[...] to non-optional with explicit defaults via #[pyo3(signature=...)].
  • Improve/expand docstrings for array/scalar writing, and refine stub types for streaming inputs (Iterator[NDArray[Any]], numpy.dtype[Any]).
  • Adjust Rust tests to match the updated method signatures.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/writer.rs Updates PyO3 signatures/arg types and expands docs for writer methods; adjusts tests accordingly.
python/omfiles/_rust/__init__.pyi Regenerated/updated type stubs to reflect new signatures and improved typing for streaming APIs.

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

Comment thread src/writer.rs
Comment thread src/writer.rs
Comment thread src/writer.rs
Comment thread src/writer.rs
Comment thread python/omfiles/_rust/__init__.pyi Outdated
Comment thread python/omfiles/_rust/__init__.pyi Outdated
@terraputix terraputix force-pushed the improve-type-stubs branch 2 times, most recently from 26a903b to 6b80240 Compare April 21, 2026 14:59
@terraputix terraputix merged commit 948d932 into main Apr 21, 2026
6 checks passed
@terraputix terraputix deleted the improve-type-stubs branch April 21, 2026 15:14
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