python / mypy

Optional static typing for Python
https://www.mypy-lang.org/
Other
18.48k stars 2.83k forks source link

new semantic analyzer #7070

Closed dfroger closed 5 years ago

dfroger commented 5 years ago

Hi,

FWIW, here are the news error messages we get by using --new-semantic-analyzer, on a 61k lines code base (no other options are passed to mypy):

error message kind occurrences notes
No library stub file for module 'XXX' 37 due to mypy.ini
Cannot find module named 'XXX' 11 due to mypy.ini
Cannot resolve name "XXX" (possible cyclic definition) 9
Missing return statement 18 due to mypy.ini
Return value expected 7 all fixed in master
Name 'XXX' is not defined 6 all fixed in master
total 88

I'll try to investigate. This "issue" is just an information, feel free to close it!

Edit: add the notes columns

ilevkivskyi commented 5 years ago

Thanks! We are much more interested in the repros for particular issues than the general "stats". Also please try it on master if possible, because couple issues were already fixed there since the release.

JukkaL commented 5 years ago

I'm particularly interested in repros for the "No library stub file" and "Cannot find module" errors, as they look different from previous issues I've seen. The other issues are interesting as well, but they may already be fixed or they may be known issues.

dfroger commented 5 years ago

Sorry, actually, a lot of error were triggerd with only the presence of a file mypy.ini containing only [mypy] (I created this file to configure mypy with new_semantic_analyzer = True instead of command line, and didn't noticed that adding the file itself introduced the errors).

On master, only the possible cyclic definition errors remain.

Edit: ahhhhh... I have a setup.cfg configuring mypy that I overrided with my mypy.ini. How could I not see it...