Skip to content

Commit

Permalink
Test run-running dmypy after a file is altered
Browse files Browse the repository at this point in the history
These tests show how some errors disappear on a re-run of dmypy after a
file is altered.

Co-authored-by: David Seddon <[email protected]>
  • Loading branch information
meshy and seddonym committed Jan 2, 2024
1 parent 9cd625d commit 94e5df4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test-data/unit/fine-grained.test
Original file line number Diff line number Diff line change
Expand Up @@ -10505,3 +10505,27 @@ from pkg.sub import modb

[out]
==

[case testUnusedTypeIgnorePreservedAfterChange]
# flags: --warn-unused-ignores --no-error-summary
[file main.py]
a = 1 # type: ignore
[file main.py.2]
a = 1 # type: ignore
# Comment to trigger reload.
[out]
main.py:1: error: Unused "type: ignore" comment
==
main.py:1: error: Unused "type: ignore" comment

[case testTypeIgnoreWithoutCodePreservedAfterChange]
# flags: --enable-error-code ignore-without-code --no-error-summary
[file main.py]
a = 1 # type: ignore
[file main.py.2]
a = 1 # type: ignore
# Comment to trigger reload.
[out]
main.py:1: error: "type: ignore" comment without error code
==
main.py:1: error: "type: ignore" comment without error code

0 comments on commit 94e5df4

Please sign in to comment.