StackOverflow Questions for Tag: python-typing

LeGEC
LeGEC

Reputation: 52081

What is the correct way to please the typechecker for a '(bytes | str) -> str' function?

Score: 2

Views: 188

Answers: 1

Read More
kratsg
kratsg

Reputation: 621

How can I get mypy to handle subclassing EnumType/EnumMeta correctly?

Score: 2

Views: 173

Answers: 0

Read More
Vulwsztyn
Vulwsztyn

Reputation: 2271

assert_type with callable

Score: 1

Views: 58

Answers: 1

Read More
ssice
ssice

Reputation: 3683

Can the * (unpacking) operator be typed in Python? Or any other variadic args function such that all variadic types are in the result type?

Score: 5

Views: 2858

Answers: 2

Read More
Gordon Mckeown
Gordon Mckeown

Reputation: 752

Satisfying Python type checking for values from a dictionary

Score: 0

Views: 68

Answers: 0

Read More
Hait
Hait

Reputation: 125

Concatenate lists with different types

Score: 4

Views: 304

Answers: 1

Read More
rrauenza
rrauenza

Reputation: 6993

Python type annotation for unique value representing 'not undefined'

Score: 0

Views: 84

Answers: 0

Read More
RheinmetallSkorpion
RheinmetallSkorpion

Reputation: 478

sql alchemy constructor typesafety

Score: 0

Views: 37

Answers: 0

Read More
pfp.meijers
pfp.meijers

Reputation: 962

PyCharm type hinting for generic type concludes property instead of property's return type

Score: 0

Views: 60

Answers: 0

Read More
Arlaf
Arlaf

Reputation: 339

Type hints for lxml.etree._Element

Score: 2

Views: 1181

Answers: 0

Read More
opnightfall1771
opnightfall1771

Reputation: 163

Correct way to type hint protected / private classes in Python?

Score: 5

Views: 2160

Answers: 1

Read More
Gareth Friend
Gareth Friend

Reputation: 1

Matplotlib canvas.mpl_connect expects function that receives "Event" type and PyCharm gives warning when using "MouseEvent" type annotation

Score: 0

Views: 34

Answers: 0

Read More
alcorn
alcorn

Reputation: 1368

Why are single type constraints disallowed in Python?

Score: 81

Views: 19167

Answers: 1

Read More
0x01010
0x01010

Reputation: 380

Is there a Python interpreter with type checking (with anottations) support

Score: 2

Views: 108

Answers: 0

Read More
David C
David C

Reputation: 2038

How to fix mypy error, "Expression has type Any [misc]", for python type hinting of int __pow__ int?

Score: 3

Views: 2312

Answers: 1

Read More
KLc3088
KLc3088

Reputation: 97

How can I tell Python that the result type of a pipeline is a certain type?

Score: 1

Views: 63

Answers: 1

Read More
Kannan Goundan
Kannan Goundan

Reputation: 5242

Tools for static type checking in Python

Score: 45

Views: 22781

Answers: 7

Read More
Michael van Gerwen
Michael van Gerwen

Reputation: 13581

How do I type hint a method with the type of the enclosing class?

Score: 1345

Views: 384744

Answers: 9

Read More
YoRHa_A2
YoRHa_A2

Reputation: 37

Descriptor type hints

Score: 1

Views: 123

Answers: 0

Read More
user3848207
user3848207

Reputation: 4977

type hint returns NameError: name 'datetime' not defined

Score: 39

Views: 59328

Answers: 2

Read More
PreviousPage 3Next