File tree Expand file tree Collapse file tree 1 file changed +37
-1
lines changed Expand file tree Collapse file tree 1 file changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -574,7 +574,7 @@ class B:
574574
575575[case testUnusedTypeIgnorePreservedOnRerun]
576576-- Regression test for https://github.com/python/mypy/issues/9655
577- $ dmypy start -- --warn-unused-ignores --no-error-summary
577+ $ dmypy start -- --warn-unused-ignores --no-error-summary --hide-error-codes
578578Daemon started
579579$ dmypy check -- bar.py
580580bar.py:2: error: Unused "type: ignore" comment
@@ -606,6 +606,42 @@ bar.py:2: error: "type: ignore" comment without error code [ignore-without-code
606606from foo.empty import *
607607a = 1 # type: ignore
608608
609+ [case testUnusedTypeIgnorePreservedAfterChange]
610+ -- Regression test for https://github.com/python/mypy/issues/9655
611+ $ dmypy start -- --warn-unused-ignores --no-error-summary --hide-error-codes
612+ Daemon started
613+ $ dmypy check -- bar.py
614+ bar.py:2: error: Unused "type: ignore" comment
615+ == Return code: 1
616+ $ echo '' >> bar.py
617+ $ dmypy check -- bar.py
618+ bar.py:2: error: Unused "type: ignore" comment
619+ == Return code: 1
620+
621+ [file foo/__init__.py]
622+ [file foo/empty.py]
623+ [file bar.py]
624+ from foo.empty import *
625+ a = 1 # type: ignore
626+
627+ [case testTypeIgnoreWithoutCodePreservedAfterChange]
628+ -- Regression test for https://github.com/python/mypy/issues/9655
629+ $ dmypy start -- --enable-error-code ignore-without-code --no-error-summary
630+ Daemon started
631+ $ dmypy check -- bar.py
632+ bar.py:2: error: "type: ignore" comment without error code [ignore-without-code]
633+ == Return code: 1
634+ $ echo '' >> bar.py
635+ $ dmypy check -- bar.py
636+ bar.py:2: error: "type: ignore" comment without error code [ignore-without-code]
637+ == Return code: 1
638+
639+ [file foo/__init__.py]
640+ [file foo/empty.py]
641+ [file bar.py]
642+ from foo.empty import *
643+ a = 1 # type: ignore
644+
609645[case testPossiblyUndefinedVarsPreservedAfterUpdate]
610646-- Regression test for https://github.com/python/mypy/issues/9655
611647$ dmypy start -- --enable-error-code possibly-undefined --no-error-summary
You can’t perform that action at this time.
0 commit comments