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

We should work towards a more formalized specification, likely based on [Kevin Millikin's "Python Static Types"](https://docs.google.com/document/d/1mVCU-nVPT_zVfqivVdMY1aOOZqJ9lsgOLweO1U3uwUM/edit). In particular, a good start would be to add terms like "consistent subtyping" to...

topic: documentation
topic: typing spec

It would be useful to have more guidance on how `__eq__` methods should be annotated. A few considerations: - Enable type checkers to warn on non-overlapping equality comparisons. The type...

topic: documentation
topic: typing spec

The typing spec should mandate that type checkers support the `typing_extensions` module by treating any name imported from it as equivalent to the same name in `typing`. This is noncontroversial...

topic: documentation
topic: typing spec

Building the docs locally yields a number of warnings: ``` % make html mkdir -p build PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees . build/html Running Sphinx v4.2.0 making output directory......

topic: documentation

I have a decorator that modifies a class at runtime, kind of like a dataclass: ```py @modify class Something: ... ``` Let's say `modify` adds `foo` onto `Something`, so after...

topic: feature

Apologies if this has already been asked/solved - I can't figure out exactly what this is called so it's very difficult to search for. I'm writing a simple strongly typed...

topic: other

For osandov/drgn#364, I'd like to be able to define a decorator that modifies the parameter types of the functions it wraps, but also preserves keywords. For a toy example, imagine...

topic: feature

(originally proposed here https://github.com/python/mypy/issues/13870 , but it turns out this is a better place to discuss) **Feature** Assume we have a mapping between types, possibly because there's a method with...

topic: feature

The type guard doesn't seem to work like an instance check: ```python from typing import TypeGuard, Any class X: pass class Y: pass x: X = X() assert isinstance(x, Y)...

topic: other

Currently collections.abc.Generator/Coroutine/AsyncGenerator etc. have attributes that don't have to exist at runtime. I think it'd be wise to switch recommending to using the types concrete classes where possible over the...

topic: other