Open
Description
Here is a minimal example:
schema = Schema({
'party': And(str, Use(str.lower), lambda s: s in ('alice', 'bob'))
})
This code works fine. However, the type checker reports an error saying that a Use
instance cannot be used as an argument of And()
. This is true in both VS Code (which uses pyright by default) and PyCharm.
I'm using similar validation rules in many places. As a result, my code is full of # type: ignore
s because otherwise I will have to disable type checking completely.
Is it possible to solve this issue?
Metadata
Metadata
Assignees
Labels
No labels