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

Return types for some ensure functions #63

Open
bgyori opened this issue Aug 17, 2023 · 0 comments
Open

Return types for some ensure functions #63

bgyori opened this issue Aug 17, 2023 · 0 comments

Comments

@bgyori
Copy link

bgyori commented Aug 17, 2023

For functions like ensure_open_zip, the return value is documented as

:yields: An open file object

so I thought this wold be something I can call e.g., read() on. Checking the type of the returned value, it's contextlib._GeneratorContextManager and it took me a little while to figure out that this means I have to use with to interact with this function. Is the documentation and type annotation for these functions correct?

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

No branches or pull requests

1 participant