typing icon indicating copy to clipboard operation
typing copied to clipboard

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

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

I would like to be able to access the type arguments of a class from its class methods. To make this concrete, here is a generic instance: ```python import typing...

topic: feature

I would find it interesting to be able to annotate functions which never throw exceptions. "Never" can be either in the absolute sense, or in the sense of "checked exceptions",...

topic: feature

is there a way to derive a `Protocol` based type from another class, so all attributes and their type annotations are declared, but may be overriden in the class body....

topic: feature

Sometimes, implementations check for the existence of a method on an object before using it. Take this example from Python 2.7's urllib: ```python class addbase: def __init__(self, fp): self.fp =...

topic: feature

Currently there is no type for the values @property returns. a) the returned value of `property` has no `typing` equivalent ```py def create_property() -> ???: some_really_bad_code = True def setter(value):...

topic: feature

This came up in python/typeshed#2287, but I have encountered the same problem myself. As far as I know, currently the only way to annotate a multi-type, fixed length sequence is...

topic: feature

Sometimes a function or method can return one of several types, depending on the passed in arguments or external factors. Best example is probably `open()`, but there are other examples...

topic: feature

The only form of cast expression we have is intended to completely bypass the type system. This is like most forms of casting in C (not counting conversions) -- it...

topic: feature

I recently stumbled at a TODO in typeshed that proposes to split `IO[AnyStr]` into smaller pieces. I think it is a good idea and propose to add two protocols: ```python...

topic: feature

Due to the lack of character type in Python, a function that accept `List[Text]` will need to be extra careful when generalize the accepted argument type. `Iterable[Text]` and `Sequence[Text]` clearly...

topic: feature