You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ty supports the standard [`type: ignore`](https://typing.python.org/en/latest/spec/directives.html#type-ignore-comments) comment
53
62
format introduced by PEP 484.
54
63
55
-
ty handles these similarly to `ty: ignore` comments, but suppresses all violations on that line,
56
-
even when `type: ignore[code]` is used.
64
+
`type: ignore` suppresses all violations on that line.
65
+
66
+
`type: ignore[ty:<rule>]` behaves like `ty: ignore[<rule>]` and only suppresses the matching
67
+
rule. Codes without a `ty:` prefix are ignored, which makes it possible to combine
68
+
suppressions for multiple type checkers in a single comment.
57
69
58
70
```python
59
71
# Ignore all typing errors on the next line
60
72
sum_three_numbers("one", 5) # type:ignore
73
+
74
+
# Ignore a mypy code and a ty rule in the same comment
0 commit comments