Skip to content

Add a flag to ignore the mypy version in cache metadata #3641

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

Merged
merged 1 commit into from
Jul 5, 2017

Conversation

gvanrossum
Copy link
Member

When testing cache improvement I'd like to be able to use cache files produced by a previous mypy version.

@@ -891,7 +891,7 @@ def find_cache_meta(id: str, path: str, manager: BuildManager) -> Optional[Cache
return None

# Ignore cache if generated by an older mypy version.
if (m.version_id != manager.version_id
if ((m.version_id != manager.version_id and not manager.options.skip_version_check)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minorest nit: The or clauses here break over a line, I think for consistency it'd be nice to do so with the and.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree, since and binds tighter and there is room.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, a style choice I suppose. Everything LGTM.

@gvanrossum gvanrossum merged commit 138f478 into python:master Jul 5, 2017
@gvanrossum gvanrossum deleted the skip-version-check branch July 5, 2017 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants