typeshed
typeshed copied to clipboard
Collection of library stubs for Python, with static types
See #14283. The overloads on `list.__add__` lead to divergence of `mypy` and `pyright`. Code sample in [pyright playground](https://pyright-play.net/?code=GYJw9gtgBALgngBwJYDsDmUkQWEMoCCKcANFGAG4CmIANmAIYAmAUCwMa0MDO3UAMkm4wCAbQAqAXQBcUKAGIoVCAFcuMKnwBGKpLRio%2BtITBZy5AAUo16zM%2BaZVgUAPovmTNwApuVWsDIwGAALGlkAIkFhMSlwsgB6AEooAFoAPihIkxjJcNkQKhgVEBQBbK9E%2B0trOkZWcyhHZzcPN1EAZUkfPwDyELDMqJEO3ITk9MHsiSgAHyhOvKgCopKy6IqqqE2OLl41mAAhCRk5RQB3JBCwFXwa2yZuTabXdyZPFxHu-0D%2BkAiho4LMapDJZYRHcSzea5fKFYqlAEbTYNFGotHojEKKAQRBwTENOYIOAgJBoYL4fGUlEsArUBi0FzwBBULxQYzCUTCEBdZIAajZJk5MG5FSgyXMinZMCF3IxcylMskmMAoOQ0qh0hlMlkCjlcnlQfkK1AwfXi0466VcqHGpVyeWCq1zG0NVW0qj0xmIbUKvWiw2CohwU0NSUB4i2tH23XCiNowAy5Gw3R6tayhmJfXz9umY6LxYo04r0XMC3qMa71e7NV7U1MMwas6IbbnzSXhdaUCa7Q3HZgOxHyxrPcya9FFX6G4Hg1iC5Oi92YxiE2rByn9kc6-yAWPknm14XI3vS%2BiB5Wh9qtxu902dy2TOu206%2B12Lw-e525Cfk9XDznM1vJ82053jKUKzlCL4gKB4bmKqQA), https://mypy-play.net/?mypy=latest&python=3.12&gist=abf6a8834020af17a16bd8cfb44b2f10 ```python from typing import Any, overload class ListA[T]: # emulates builtins...
The overloads on `list.__add__` lead to divergent behavior between `mypy` and `pyright` when doing something as simple as a list concatenation ```python # Overloading looks unnecessary, but is needed to...
See #14283. Sibling PR for #14282.
Release: https://pypi.org/pypi/flake8-simplify/0.22.0 Homepage: https://github.com/MartinThoma/flake8-simplify Repository: https://github.com/MartinThoma/flake8-simplify Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/flake8-simplify If stubtest fails for this PR: - Leave this PR open (as a reminder, and to prevent stubsabot from opening another...
Release: https://pypi.org/pypi/lupa/2.5 Homepage: https://github.com/scoder/lupa Repository: https://github.com/scoder/lupa Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/lupa If stubtest fails for this PR: - Leave this PR open (as a reminder, and to prevent stubsabot from opening another...
I'm using typeshed_client to get the typeshed `ast` stub file, then I'm doing ast things to the file, and I am writing extra code to accommodate these three things https://github.com/python/typeshed/blob/ecd5141cc036366cc9e3ca371096d6a14b0ccd13/stdlib/ast.pyi#L1495-L1498...
* Add missing stubs * Use Incomplete instead of Any * Complete some stubs
[Python API](https://jsonnet.org/ref/bindings.html#python_api) [`_jsonnet.c`](https://github.com/google/jsonnet/blob/master/python/_jsonnet.c) I used discrete types rather than abstract. Tuple is strictly required but I do not know if `PyDict_*` API can accept `Mapping`. I assume no so it's...