typeshed
typeshed copied to clipboard
Collection of library stubs for Python, with static types
All the code snippets in the following cases passed `mypy . --strict` but failed at runtime. ## Case 1 ```py import tarfile with tarfile.open("filename.tar", "w", compresslevel=None) as tar: tar.add("readme.txt") ```...
I'm expecting to have issues, but since it's been updated for Python 3.12 and Windows in the last week I figured may as well try it out. Edit: Actually looks...
I appreciate that https://github.com/python/typeshed/pull/11559/files attempts to add more thorough type hints, but that seems to have stagnated. I think that: * This provides some type safety for using docutils.core. *...
I've hinted at it previously, I am now officially suggesting we rewrite the shell scripts found in `scripts` in Python instead. - They only worked\* on Linux (now MacOS) -...
Hi folks, For the simple program ```py from email.message import EmailMessage def process_attachment(a: EmailMessage) -> None: assert isinstance(a, EmailMessage) msg = EmailMessage() msg.add_attachment(b"foo", maintype="application", subtype="pdf") for a in msg.iter_attachments(): process_attachment(a)...
Refs: - https://github.com/papadeltasierra/typeshed/actions/runs/10358301701 - https://github.com/papadeltasierra/typeshed/actions/runs/10358301703 Both these CI pipelines show errors despite me running `tests/runtests.py` locally beforehand and seeing no errors. I assume this is the result of some sort...
This PR adds type stubs for the BioPandas library. BioPandas is a popular library for working with molecular structures and data in pandas DataFrames. These stubs aim to improve type...
Update `importlib.resources` based on 3.13 API changes: https://github.com/python/cpython/pull/116609