Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New posts in python-typing

Type hinting the return value of a class method that returns self?

python python-typing

Pylance: unexpected type inference for a union of two list types

Create dataclass instance from union type based on string literal

Python: type-hinting a classmethod that returns an instance of the class, for a class that is inherited

python python-typing mypy

Python Decorator for Async and Sync Function without code duplication

Correct type annotation for a celery task

python celery python-typing

How to annotate a dataclass' attribute as another dataclass' object?

How to type hint variable that is initially None but is guaranteed to get a value

python python-typing

How to get an abstract dataclass to pass mypy?

Python3 pickle: Expected type 'SupportsWrite[bytes]', got 'BinaryIO' instead

What is the proper way to type hint the return value of an @asynccontextmanager?

How to implement type hinting for DataFrame

If there are multiple possible return values, should pyright automatically infer the right one, based on the passed arguments?

Dealing with lack of non-null assertion operator in Python

python mypy python-typing

Correct way to hint that a class is implementing a Protocol?

python python-typing

Annotate decorator with ParamSpec correctly using new typing syntax (3.12)

How to override a class __init__ method while keeping the types

python mypy python-typing

Pydantic model fields with typing.Optional[] vs. typing.Optional[] = None