Skip to content

Commit cf126cd

Browse files
Cover type-comment subscript line offsets
1 parent 8dee2d2 commit cf126cd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test-data/unit/check-errorcodes.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,12 @@ def foo() -> dict[
10961096
return {}
10971097
[builtins fixtures/dict.pyi]
10981098

1099+
[case testTypeCommentNestedSubscriptWrongArityLineNumber]
1100+
# flags: --python-version 3.12
1101+
x = 0
1102+
y = {} # type: dict[int, int, int] # E: "dict" expects 2 type arguments, but 3 given [type-arg]
1103+
[builtins fixtures/dict.pyi]
1104+
10991105
[case testSliceInDictBuiltin_no_native_parse]
11001106
# flags: --show-column-numbers
11011107
b: dict[int, x:y]

0 commit comments

Comments
 (0)