Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New posts in python-typing

How to annotate a custom types __iter__ to correctly indicate non-uniform returned types?

python mypy python-typing

What is the difference between p = {} and p: dict= {} in python? [duplicate]

Do you replicate type hints of function within the docstring of the function? PEP Guidelines?

How to type hint a function's optional return parameter?

python python-typing

Type hinting for Django Model subclass

Python typing: best way to annotate parent class return subclass type object

python mypy python-typing

How to typehint that an object of a class is also adhering to a Protocol in Python?

python python-typing mypy

Is there any way to override inherited class attribute type in python with mypy?

Python type hinting for a generic mutable tuple / fixed length sequence with multiple types

Why does slots not work with final dataclass attribute?

Getting a variable of Python type T from an Optional[T]

python python-typing

Why does mypy flag "Item None has no attribute x" error even if I check for None?

python mypy python-typing

How to annotate that a function produces a dataclass?

python python-typing mypy

How to add type hint for all protocol buffer objects in python functions?

Defining an Annotated[str] with constraints in Pydantic v2

How to use a type defined later for function annotations?

python python-typing

Does mypy require __init__ to have -> None annotation

python mypy python-typing