Skip to content

Conversation

pgarrison
Copy link
Contributor

@pgarrison pgarrison commented Apr 11, 2025

[x] I followed the How to structure your PR.
[ ] Based on Commit Parsing: In case a new major release will be created (because the body or footer begins with 'BREAKING CHANGE:'), I created a new Jupyter notebook with a matching version.
[ ] Based on Commit Parsing: In case a new minor/patch release will be created (because PR title begins with 'feat'/('fix' or 'perf')), I optionally created a new Jupyter notebook with a matching version.
[ ] In case of API changes, I updated API.md.

Issue

If a user does the following, the most narrow inferred type for file is Any, but file is a CziReader.

from pylibCZIrw import czi

with czi.open_czi(file_path) as file:
    file

Changes

Specify yield type for open_czi and create_czi

Testing

  • I ran mypy
  • When using the example above, Pylance now infers CziReader for file.

@sebi06 sebi06 requested review from FelixS90 and sebi06 and removed request for FelixS90 June 25, 2025 12:23
Copy link

@sebi06 sebi06 left a comment

Choose a reason for hiding this comment

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

Good idea. Looks fine to me.

@pgarrison
Copy link
Contributor Author

@sebi06 Before this can be merged, you'll have to click "Approve workflows to run" to allow CI to start.

https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/approving-workflow-runs-from-public-forks

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