Skip to content

Mypy report does not get generated when cache is fresh #5103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
qria opened this issue May 24, 2018 · 4 comments
Closed

Mypy report does not get generated when cache is fresh #5103

qria opened this issue May 24, 2018 · 4 comments
Labels
bug mypy got something wrong topic-incremental

Comments

@qria
Copy link

qria commented May 24, 2018

Mypy report does not get generated when cache is fresh (i.e. not stale).

Say we have a python file a.py:

a.py

def foo():
	pass

Without .mypy_cache folder xml report generated by mypy a.py --xml-report . is as follows:

index.xml

<?xml-stylesheet type="text/xsl" href="mypy-html.xslt"?><mypy-report-index name="index"><file module="a" name="a.py" total="2" any="1" empty="1" imprecise="0" precise="0" unanalyzed="0"/></mypy-report-index>

However running mypy a.py --xml-report . again produces this:

index.xml

<?xml-stylesheet type="text/xsl" href="mypy-html.xslt"?><mypy-report-index name="index"/>

Removing .mypy_cache and running it again properly generates the report.

Versions:

python version: 3.6.5
mypy version: mypy-0.610+dev.76d60b018c93f6879a01a30f89bf0586c610bc06
lxml version: lxml-4.2.1

@mchlnix
Copy link

mchlnix commented Dec 16, 2018

Same thing happens to me with the html report.

@gvanrossum
Copy link
Member

gvanrossum commented Dec 16, 2018 via email

@mchlnix
Copy link

mchlnix commented Dec 16, 2018

If this isn't a duplicate, a bug label might aid visibility.

@gvanrossum
Copy link
Member

Technically it's already mentioned here: #1123 (comment)

But I'm happy to keep this open as a separate issue. It's unlikely to be fixed in any way other than forcing incremental mode off when generating the reports though...

@gvanrossum gvanrossum added bug mypy got something wrong topic-incremental labels Dec 16, 2018
mthuurne added a commit to mthuurne/mypy that referenced this issue Dec 17, 2018
If the cache is used, coverage information will only be reported for
modules that were not in the cache.

Fixes python#5103
mthuurne added a commit to mthuurne/mypy that referenced this issue Dec 17, 2018
If the cache is used, coverage information will only be reported for
modules that were not in the cache.

Fixes python#5103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-incremental
Projects
None yet
Development

No branches or pull requests

3 participants