typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

Collection of library stubs for Python, with static types

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

For instance, this script passes mypy: ```python import contextlib from typing import Iterator @contextlib.contextmanager def f() -> Iterator[int]: return iter([1]) with f(): pass with f(): raise TypeError('wat') ``` but fails...

stubs: false negative
status: deferred

I'm quite surprised because I can use a Counter to store non-integer values. Is it a feature or just permissiveness in implementation? E.g. the following code works (tested on python...

stubs: false positive

… to preserve signatures of wrapped and wrapper functions.

needs decision

This issue is supposed to track when we can start to use parameter specification variables ([PEP 612](https://www.python.org/dev/peps/pep-0612/)) in typeshed. Support is needed in released versions of: * [ ] mypy...

feature-tracker

Cf. python/typing#182 I have deliberately not added this to any existing stubs, since that might be disruptive and needs experimentation independent from the alias itself.

It seems `third_party/3/docutils` contains only very few classes and modules of docutils. https://github.com/python/typeshed/tree/master/third_party/3/docutils For example, the only one class `reference` is defined at `nodes.pyi`. But actual `docutils.nodes` module provides many...

size-large
type-incomplete
help wanted

This is not an easy problem, and I don't expect that we will fix this soon. But I'd like to at least start a discussion about ways to move the...

project-discussion

# Reproducer ``` python3.8 -m venv /tmp/py38 source /tmp/py38/bin/activate pip -q install mypy stubtest concurrent.futures ``` # Tentative fix ```diff diff --git a/stdlib/concurrent/futures/_base.pyi b/stdlib/concurrent/futures/_base.pyi index 5b756d87..fc6a342c 100644 --- a/stdlib/concurrent/futures/_base.pyi +++...

```py from enum import Enum value: Enum reveal_type(value) reveal_type(value.name) ``` ``` > mypy --python-version 3.10 test.py test.py:5: note: Revealed type is "enum.Enum" test.py:6: note: Revealed type is "str" Success: no...