typing icon indicating copy to clipboard operation
typing copied to clipboard

Python static typing home. Hosts the documentation and a user help forum.

Results 241 typing issues
Sort by recently updated
recently updated
newest added

The `Unpack` addition has been great, however a lot of our code has an existing library of dataclasses instead of typed dictionaries. Here's a dummy example using one of the...

topic: feature

Proposal: The idea is to be able to pass variables as constants, mimicking c++ or rust behaviour such as. And have this be solely as part of the typings ecosystem....

topic: feature

I'm opening this issue to discuss a typing feature supported by major type checkers (at least pyright and partially mypy), that allows users to annotate the `self` argument of an...

topic: feature

In PyCharm you can set the programming/markup language of strings like this: ```py # language=html foo = 'hello there!' ``` I find this extremely useful and use it all over...

I found this function in our codebase and I'm trying to type it: ```python def run_until_truthy(fn, num_tries=5): for _ in range(num_tries): if res := fn(): return res Exception('Giving up.') ```...

topic: feature

The [Type Stubs document](https://typing.readthedocs.io/en/latest/source/stubs.html) (source/stubs.rst) is based on a proposed PEP by @rchen152, @JelleZijlstra, @Solumin, and myself to describe the allowed elements of type stubs. It was turned into kind...

Typing Council decision

I don't believe that the behavior of `NamedTuple` is sufficiently specified. See e.g. https://discuss.python.org/t/what-are-the-subtyping-rules-for-tuple-t/39837/52 .

topic: typing spec

When modeling semi-structured data, discriminated unions are an invaluable tool in your arsenal. It allows you to model a variable unit of data, where each unit concisely specifies its type...

topic: feature

PEP 484 (and therefore the current typing spec) implies that type checkers must support the old "type comment" syntax. However, this syntax is unnecessary since Python 3.6 and PEP 526,...

topic: documentation
topic: typing spec