Search code examples
When to use IO[str]/IO[bytes] and TextIO/BinaryIO in Python type hinting?...

pythonpython-typing

Read More
What is the magic behind 'dataclass' decorator type-hint of dataclasses module?...

pythonpython-typingpython-dataclasses

Read More
Why io.BytesIO is not a subclass of typing.BinaryIO, and io.StringIO is neither a subclass of typing...

pythonpython-typingduck-typing

Read More
Type hint for a tuple of variable length (variadic tuple)?...

pythonpython-typingmypy

Read More
What is the difference between TypeVar and NewType?...

pythonpython-typingmypy

Read More
typing.Any vs object?...

pythonpython-typing

Read More
mypy: argument of method incompatible with supertype...

pythonpython-typingmypy

Read More
How do I formalize a repeated relationship among disjoint groups of classes in python?...

pythonpython-typing

Read More
How can I specify the data structure so requirements of mypy and pydantic are satisfied...

pythonpython-typingmypypydantic

Read More
How can mypy ignore a single line in a source file?...

pythonpython-typingmypy

Read More
"json_schema_extra" and Pylance/Pyright issues...

pythonpython-typingpydanticpyright

Read More
How do you alias a type in Python?...

pythonpython-typingtype-alias

Read More
Python typing: accept kwargs only with some class' methods...

pythonpython-typing

Read More
Type hinting Pandas DataFrame content and columns...

pythonpandasdataframepython-typing

Read More
Type hint with string constant...

pythonpython-typing

Read More
ImportError: cannot import name 'deprecated' from 'typing_extensions' with llama_ind...

pythonvisual-studio-codejupyter-notebookpython-typing

Read More
What is `np.ndarray[Any, np.dtype[np.float64]]` and why does `np.typing.NDArray[np.float64]` alias i...

pythonnumpypython-typing

Read More
How to statically enforce frozen data classes in Python?...

pythonmypypython-typingpython-dataclasses

Read More
How to avoid class Foo from being treated as __main__.Foo?...

pythonpython-importpython-typing

Read More
How to hint argument to a function as dictionary with parent class in Python...

pythonpython-typing

Read More
Python type hints: typing.Mapping vs. typing.Dict...

pythonpython-typing

Read More
Typing a Python dictionary as Dict[key[T], value[K]] where T and K are restricted...

pythonmypypython-typingpyright

Read More
Nested Pydantic Models and Generics...

pythongenericspython-typingpydantic

Read More
Silence mypy arg-type error when using stategy pattern...

pythonpython-typingmypy

Read More
type hints (warnings) for Python in VS Code...

pythonvisual-studio-codepython-typing

Read More
Python Protocol using keyword-only arguments requires implementation to have different signature...

pythonpython-3.xpycharmpython-typing

Read More
Type a callable which accepts at least one argument...

pythonpython-typing

Read More
what's the advantage of `NewType` over `TypeAlias`?...

pythonpython-typing

Read More
Annotate a tuple with variable number of items and first item is of different type...

pythonmypypython-typing

Read More
Type annotations for *args and **kwargs...

pythonpython-typing

Read More
BackNext