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

As far as I can see, `choices` of a `SelectField` also support an Iterable of just a `str`s, not only a `tuple[Any, str]`. ```python SelectField(choices=["foo", "bar"]) ``` This is apparently...

This allows us to have code like: ```python for line in container.logs(stream=True): line.decode() # Type checker knows that `line` is bytes ```

Fix issues detailed in https://github.com/python/typeshed/issues/12141.

Add overload cases based on each mode to eliminate false positives for types that don't fully implement `IO[bytes]`, per https://github.com/python/typeshed/issues/10880

# Description Several functions have arguments annotated as `Graph[Hashable]` or similar (ex. `nx.number_of_selfloops`). As `Graph` is invariant, we encounter false-positive type errors when trying to assign concrete types (say `Graph[int]`).

stubs: false positive

Flask-SQLAlchemy-Lite was just released which is intended to be a replacement for Flask-SQLAlchemy. https://flask-sqlalchemy-lite.readthedocs.io/en/stable/ With that there is then a type conflict with `flask_migrate`: https://github.com/python/typeshed/blob/main/stubs/Flask-Migrate/flask_migrate/__init__.pyi#L52 It expects `flask_sqlalchemy.extension.SQLAlchemy`, but `flask_sqlalchemy_lite._extension.SQLAlchemy`...

stubs: improvement

This incorporates the changes of the following PRs: - https://github.com/python/cpython/pull/120028 - https://github.com/python/cpython/pull/120099 - https://github.com/python/cpython/pull/120151 - https://github.com/python/cpython/pull/119976 @JelleZijlstra Should I also write the stubs for `_symtable` or should I leave it...

status: deferred

The following code fails to typecheck with latest mypy but works just fine at runtime. ```py from typing import Any import asyncio class MyCoro: def __init__(self): async def coro() ->...

topic: asyncio

The pipe modes for `tarfile.open()` require only a simplified file object, not the full protocol. From [the documentation](https://docs.python.org/3/library/tarfile.html#tarfile.open): > For special purposes, there is a second format for mode: 'filemode|[compression]'....