typeshed
typeshed copied to clipboard
Collection of library stubs for Python, with static types
Protected method types are needed for sub-classing support. Else mypy complains like: `"PrettyPrinter" has no attribute "_format_dict_items"`.
Extracted from https://github.com/python/typeshed/pull/14038 Return types are a lot more straightforward to validate. So I extracted them in their own PR to reduce the size of https://github.com/python/typeshed/pull/14038
Currently, some dunder methods like `Sequence.__getitem__` do not use positional-only arguments, which causes errors when trying to subclass with positional-only arguments. Therefore, dunder methods, especially operators like `__getitem__`, that are...
Apart from this being the "modern way" to do things, this would allow us to use dependency groups. Nowadays we have a hodgepodge of dependencies in `requirements-tests.txt` for various purposes....
Recent removal of `Incomplete` (python/typeshed#14029) in `HTMLParser.__init__()` breaks `pyright` strict mode, so fill in minimal necessary argument type info as remedy.
Closes #14235
Closes #14177 Closes #14211