File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -557,6 +557,42 @@ bar.py:2: error: "type: ignore" comment without error code [ignore-without-code
557557from foo.empty import *
558558a = 1 # type: ignore
559559
560+ [case testUnusedTypeIgnorePreservedAfterChange]
561+ -- Regression test for https://github.com/python/mypy/issues/9655
562+ $ dmypy start -- --warn-unused-ignores --no-error-summary
563+ Daemon started
564+ $ dmypy check -- bar.py
565+ bar.py:2: error: Unused "type: ignore" comment
566+ == Return code: 1
567+ $ echo '' >> bar.py
568+ $ dmypy check -- bar.py
569+ bar.py:2: error: Unused "type: ignore" comment
570+ == Return code: 1
571+
572+ [file foo/__init__.py]
573+ [file foo/empty.py]
574+ [file bar.py]
575+ from foo.empty import *
576+ a = 1 # type: ignore
577+
578+ [case testTypeIgnoreWithoutCodePreservedAfterChange]
579+ -- Regression test for https://github.com/python/mypy/issues/9655
580+ $ dmypy start -- --enable-error-code ignore-without-code --no-error-summary
581+ Daemon started
582+ $ dmypy check -- bar.py
583+ bar.py:2: error: "type: ignore" comment without error code [ignore-without-code]
584+ == Return code: 1
585+ $ echo '' >> bar.py
586+ $ dmypy check -- bar.py
587+ bar.py:2: error: "type: ignore" comment without error code [ignore-without-code]
588+ == Return code: 1
589+
590+ [file foo/__init__.py]
591+ [file foo/empty.py]
592+ [file bar.py]
593+ from foo.empty import *
594+ a = 1 # type: ignore
595+
560596[case testPossiblyUndefinedVarsPreservedAfterUpdate]
561597-- Regression test for https://github.com/python/mypy/issues/9655
562598$ dmypy start -- --enable-error-code possibly-undefined --no-error-summary
You can’t perform that action at this time.
0 commit comments