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.
1 parent 19d9d40 commit 8b62963Copy full SHA for 8b62963
test-data/unit/check-errorcodes.test
@@ -394,6 +394,19 @@ def f() -> None:
394
def g():
395
pass
396
397
+[case testErrorCodeUntypedDecorator]
398
+# flags: --disallow-untyped-decorators --warn-unused-ignores
399
+def d(f): return f
400
+
401
+@d # E: Untyped decorator makes function "x" untyped [untyped-decorator]
402
+def x() -> int: return 1
403
+@d # type: ignore
404
+def y() -> int: return 2
405
+@d # type: ignore[untyped-decorator]
406
+def best() -> int: return 3
407
+@d # type: ignore[misc] # E: Unused "type: ignore" comment, use narrower [untyped-decorator] instead of [misc] code [unused-ignore]
408
+def z() -> int: return 4
409
410
[case testErrorCodeIndexing]
411
from typing import Dict
412
x: Dict[int, int]
0 commit comments