Skip to content

Commit f4ae759

Browse files
add failing testUnusedIgnoreCodeOrder tests
1 parent 6e9fb59 commit f4ae759

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test-data/unit/check-ignore.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,14 @@ class CD(six.with_metaclass(M)): # E: Multiple metaclass definitions
275275

276276
[builtins fixtures/tuple.pyi]
277277

278+
[case testUnusedIgnoreCodeOrder]
279+
# flags: --warn-unused-ignores
280+
5 # type: ignore[import, steven] # E: Unused "type: ignore[import, steven]" comment
281+
-- User ordering of codes is preserved
282+
5 # type: ignore[steven, import] # E: Unused "type: ignore[steven, import]" comment
283+
-- Spacing is not preserved
284+
5 # type: ignore[ steven, import ] # E: Unused "type: ignore[steven, import]" comment
285+
278286
[case testUnusedIgnoreTryExcept]
279287
# flags: --warn-unused-ignores
280288
try:

0 commit comments

Comments
 (0)