typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

Collection of library stubs for Python, with static types

Results 615 typeshed issues
Sort by recently updated
recently updated
newest added

These mypy warnings are overzealous, as it's often quite useful to have partial overlaps: We ignore this warning in 192 places in typeshed at the moment, and I don't think...

project: infrastructure

This was introduced by the C implementation of `splitroot` in `ntpath` and `posixpath`. The C version changes the argument name from `p` to `path` but I think based on similar...

To get an instance of the redis client (redis.Redis), you can either call the [constructor](https://redis.readthedocs.io/en/stable/examples/connection_examples.html#Connecting-to-a-redis-instance-with-standard-credential-provider) ([docs](https://redis.readthedocs.io/en/stable/connections.html#connecting-to-redis)) directly, or use the `from_url` [method](https://redis.readthedocs.io/en/stable/connections.html#redis.Redis.from_url). In both cases you can specify options using...

stubs: false positive
help wanted

mypy fails: ``` /tmp/tmpukd3yzxb/.venv-393476311071167225/lib/python3.11/site-packages/numpy/ma/extras.pyi:2: error: Cannot find implementation or library stub for module named "numpy.lib.index_tricks" [import-not-found] /tmp/tmpukd3yzxb/.venv-393476311071167225/lib/python3.11/site-packages/numpy/ma/extras.pyi:2: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports ``` Affects: * [ ] seaborn * [ ] shapely...

stubs: improvement
help wanted

Currently we assume that the semaphore's value must be an integer: https://github.com/python/typeshed/blob/1af9de664f41b51bd3b71dac349564c5c25df810/stdlib/asyncio/locks.pyi#L88-L93 Generally this is correct, but I had a use case where I wanted to disable the semaphore without...

Stubtest fails: ---- ``` Commands run: /tmp/tmpnj02fgq8/bin/pip install networkx[]==3.2.1 mypy==1.10.0 numpy MYPYPATH=/home/runner/work/typeshed/typeshed/stubs/networkx /tmp/tmpnj02fgq8/bin/python -m mypy.stubtest --custom-typeshed-dir /home/runner/work/typeshed/typeshed --ignore-missing-stub networkx --allowlist stubs/networkx/@tests/stubtest_allowlist.txt ********************************************************************** Command output: error: networkx.DiGraph.adj variable differs from runtime...

stubs: improvement
help wanted

# Bug report ### Bug description: The [create_aggregate documentation](https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.create_aggregate) does not specify a result type of the aggregation and even allows for multiple aggregating values per row (`n_arg` parameter). However,...

stubs: false positive

Python 3.13 [introduced](https://docs.python.org/3.13/library/stdtypes.html#class.__static_attributes__) `__static_attributes__` special attribute for classes. The trick is - it is not defined on `object` ... ``` AttributeError: type object 'object' has no attribute '__static_attributes__' ``` What...

Ref. https://github.com/python/typeshed/blob/58f2a795bac5924367d21961af53a32af7bb5727/stdlib/builtins.pyi#L98 This results in mypyc raising an error upon code accessing `obj.__class__.__module__`, which I believe is the canonical way to get the attribute. See https://github.com/mypyc/mypyc/issues/1055 Note that Cython doesn't...