StackOverflow Questions for Tag: python-typing

pfp.meijers
pfp.meijers

Reputation: 962

How to nest generic type definitions?

Score: 1

Views: 34

Answers: 0

Read More
Ellis Percival
Ellis Percival

Reputation: 5042

How to properly type-hint a Python dict whose keys are Type[T] and values are generics of that type?

Score: 3

Views: 765

Answers: 2

Read More
Jan Spurny
Jan Spurny

Reputation: 5537

Correct annotation for "apply" function

Score: 1

Views: 61

Answers: 1

Read More
Jonathan Herrera
Jonathan Herrera

Reputation: 6184

Dynamically create Literal alias from list of valid values

Score: 102

Views: 49160

Answers: 7

Read More
George
George

Reputation: 4011

How do I get Pylance to ignore the possibility of None?

Score: 53

Views: 29943

Answers: 3

Read More
Rafael S. Calsaverini
Rafael S. Calsaverini

Reputation: 14022

How to use Generic (higher-level) type variables in type hinting system?

Score: 14

Views: 2059

Answers: 2

Read More
Mircode
Mircode

Reputation: 746

Python: Initializing extra members in a subclass without overriding/obfuscating the base class' __init__

Score: 1

Views: 96

Answers: 1

Read More
Kaki In
Kaki In

Reputation: 94

How to verify if a instance of a generic class is from the good type variable in python3?

Score: 1

Views: 36

Answers: 1

Read More
globglogabgalab
globglogabgalab

Reputation: 455

Why should I use the `type` statement in Python 3.12 and upwards?

Score: 0

Views: 51

Answers: 0

Read More
mgab
mgab

Reputation: 3994

How to annotate a function that preserves type but applies a transformation to certain types in Python?

Score: 3

Views: 94

Answers: 1

Read More
Valentin Macé
Valentin Macé

Reputation: 1272

Typing unused arguments

Score: 1

Views: 1119

Answers: 4

Read More
suizokukan
suizokukan

Reputation: 1379

Iterable[str] vs [str]

Score: -1

Views: 180

Answers: 1

Read More
Daraan
Daraan

Reputation: 3947

Generate pyi stubfile for not importable C module

Score: 0

Views: 90

Answers: 1

Read More
Vince M
Vince M

Reputation: 1196

How to type a function with Callable without losing keyword argument?

Score: 2

Views: 1228

Answers: 1

Read More
Daraan
Daraan

Reputation: 3947

What do ** (double star/asterisk) and * (star/asterisk) inside square brakets mean for class and function declarations in Python 3.12+?

Score: 4

Views: 147

Answers: 1

Read More
Matt
Matt

Reputation: 1632

Overload a method based on init variables

Score: 4

Views: 88

Answers: 1

Read More
Matt
Matt

Reputation: 1632

Overloaded method invocation causes type check error

Score: 1

Views: 58

Answers: 1

Read More
Anton Zelenin
Anton Zelenin

Reputation: 33

Python inspector ignores property return hint when using TypeVar

Score: 0

Views: 49

Answers: 1

Read More
samuelbrody1249
samuelbrody1249

Reputation: 4767

What's the point of using TypeVar?

Score: 9

Views: 4857

Answers: 3

Read More
Sujay
Sujay

Reputation: 375

Missing type parameters for generic type "StrictRedis"

Score: 0

Views: 87

Answers: 2

Read More
PreviousPage 4Next