Showing posts with the label
python-typing
Issue In Python 3.9+ I can write list_of_integers: list[int] , but I see senior developers using th…
Issue Lets say I want to declare an input type originating from an optional dependency of my librar…
Issue from typing import TypeVar T = TypeVar('T') class MyList: def __init__(self): …
Issue I want to do something like class my_class: def __add__(self, other: "my_class"…
Issue I have an existing TypedDict containing multiple entries: from typing import TypedDict class…
Issue I'm trying to work out how to add a type annotation for a function argument that should b…
Issue Say you want to wrap the dataclass decorator like so: from dataclasses import dataclass de…
Issue Here is the problem: I have a dictionary that keeps track of two different types of values (…
Issue python version: 3.10.2 It was of my understanding that list[str|int] should allow three dis…
Issue I have this piece of code: import enum class Color(enum.Enum): RED = '1' B…
Issue I have a function which returns a function. I would like to find a proper type annotation. Ho…
Issue Assume you have a Python class that inherits from Generic[T]. Is there any way to get a hold …
Issue I have a generic class Graph[Generic[T], object] . My question, is there any function which …
Issue I make creating a discord asynchronous library that is fully typed. I have a method that crea…
Issue If I want to have a type that can be multiple possible types, Union s seem to be how I repres…
Issue I have a function with multiple kwargs with defaults. One of them (in the middle somewhere) i…
Issue Assume we are given a generic class definition such as: from dataclasses import dataclass fr…
Issue I'm writing my own wrapper around boto3 for quick firing functions. I'm trying to ty…
Issue I have the following code def func1(f: Callable): def decorator(*args, **kwargs): …
Issue I'm trying to split my huge class into two; well, basically into the "main" cla…