We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ty
invalid-argument-type
1 parent 61a1dd0 commit c1129ccCopy full SHA for c1129cc
typing-examples/baseline.py
@@ -98,7 +98,11 @@ class Validated:
98
class ValidatedOptionalOverTuple:
99
num: int | None = attrs.field(
100
validator=attrs.validators.optional(
101
- (attrs.validators.instance_of(int), attrs.validators.ge(0))
+ (attrs.validators.instance_of(int), attrs.validators.ge(int(0)))
102
+ # `int(0)` needed to avoid false positive
103
+ # `invalid-argument-type` when checking with
104
+ # ty 0.0.8 (aa7559db8 2025-12-29): ty assumes `ge`'s
105
+ # specialization is `Literal[0]` rather than `int`
106
)
107
108
0 commit comments