hauntsaninja / mypy_primer

Run mypy and pyright over millions of lines of code
MIT License
55 stars 29 forks source link

"Skipping remaining errors" message not being disabled #38

Closed pranavrajpal closed 2 years ago

pranavrajpal commented 2 years ago

5d50d01ac59601f8e25f9c3f2c9382c555994928 should have disabled the behavior where mypy prints a "(Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)" error instead of printing all errors, but it doesn't seem to be completely working.

In the mypy_primer diff for https://github.com/python/mypy/actions/runs/2403480711, searching for that error message in the downloaded mypy_primer diffs gives me these matches:

diff_1.txt
11529:- tests/test_wrappers.py:1132: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)
11530:+ tests/test_wrappers.py:103: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)
11633:- ibis/expr/types/generic.py:844: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)
11634:+ ibis/expr/types/generic.py:210: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)
11816:+ dulwich/cli.py:360: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)
12007:+ tests/Issue.py:105: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)
12013:+ python/pyspark/find_spark_home.py:55: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)
12014:- python/pyspark/sql/pandas/_typing/__init__.pyi:40: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)

diff_2.txt
6965:+ xarray/core/dataset.py:2278: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)

Searching for that error using the github search bar on the mypy repo also finds a decent number of examples of the same error in mypy_primer diffs (such as in https://github.com/python/mypy/pull/12729#issuecomment-1123057603).

My understanding is that, after the linked commit, the mypy_primer diff should never include the "skipping remaining errors" message in the diff since both master and the PR version of mypy should print all messages, so I think the appearance of those errors is a bug.

hauntsaninja commented 2 years ago

Thanks for reporting! It looks like I'd reverted that change, but I can't remember why, and it looks like I did a bad job and didn't leave myself a commit message. So I recommitted it, and I guess we'll find out :-)