Description
Even in verbose mode, mypy
diagnostic output misses a lot of very useful things:
- Path to Python interpreter that is actually being used;
- Path to config file that is actually being used;
- Path to cache location that is actually being used.
- Actual path to files to check, gathered from
MYPYPATH
variable and config file.
Also for each file being checked, it would be useful to know:
- Full path to the file;
- Why
mypy
decided to check this particular file? Was it specified in the command line? By filename? By package name? By module name? Was it found inMYPYPATH
? Was itimport
ed by some other file? Maybe there are other ways? - If module is
import
ed, was it found in the current directory? InMYPYPATH
? Indist-packages
of the python interpreter? - Is it a stub or an actual source file?
If file gets import
ed, but import fails, it would be extremely useful to know, why particularly.
- Is module really not found?
- Is module found, but stubs are not?
- Maybe stubs were found, but they're incorrect?
I'm having serious trouble debugging my mypy
configuration in CI/CD system, for example at some points mypy
stops seeing my stubs I've created for a 3rd-party library I use, and than at some points starts seeing them again. The cause is eluding me for many hours, and tracking it is really difficult without detailed logging.
I understand most of my questions are silly, but I'm really having trouble finding answers to them, and by the way, verbose/debug mode IS really a way to get answers to a lot of silly questions that nobody thought somebody would ever need, but at some points someone does, isn't it?