typeshed
typeshed copied to clipboard
Collection of library stubs for Python, with static types
It might be a good idea to add platform availability information to stdlib/VERSIONS, instead of using the sys.platform hack we're currently using in the source files. This has the same...
…d [here](https://discuss.python.org/t/draft-of-typing-spec-chapter-for-enums/43496/9) and [here](https://github.com/python/typing-council/issues/11). This is an experiment to understand the potential impact of this change: DO NOT MERGE
I recently fixed a bug in pyright that caused a false negative when attempting to assign a `list[LiteralString]` to a `list[str]`. As we know, the type parameter for `list` is...
A function decorated with `@functools.cache` loses its signature: ```python @functools.cache def my_func(foo: int | list) -> str: return str(foo) my_func('completely', 'incorrect', 'arguments') # Success: no issues found in 1 source...
AbstractContextManager should not be a protocol or else the exit method, which is abstract, cannot be determined by type checkers to be implemented. This prevents users from calling super. For...
Hello everyone, after updating to mypy 0.981, i received a mypy error for multiprocessing.Value: ``` from multiprocessing import Value import ctypes mapper = Value(ctypes.c_float, float("nan")) mapper.value = 2.3 # error:...
I don't know whether this is a bug in Python or a bug in typeshed, but it's a bug in at least one. (And I'm kind of worried that both...
There are a few types in `collection.abc` that subclass protocols but are not protocols themselves. For example `Sequence` is a subclass of `Collection` and `Reversible`. It expects subclasses to implement...
Curses is available on Windows through a patch via the windows-curses package. See discussion in #6749.