Skip to content

"Invalid type" errors appearing on Travis but not locally #431

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
Strilanc opened this issue May 28, 2018 · 2 comments
Closed

"Invalid type" errors appearing on Travis but not locally #431

Strilanc opened this issue May 28, 2018 · 2 comments

Comments

@Strilanc
Copy link
Contributor

I thought I fixed these by moving the line assigning the type variable into its own file, but the error has reappeared: https://travis-ci.com/quantumlib/Cirq/jobs/126214384

@maffoo , any ideas how to solve this? I don't think it's exactly the same as the python/mypy#5015 issue we previously reported, but it looks pretty similar.

@maffoo
Copy link
Contributor

maffoo commented May 29, 2018

I think the first step to solving this is to pin the mypy version in the requirements file to ensure that we are using the same version of the type checker everywhere. mypy is still in flux enough that these kinds of issues can come and go.

@Strilanc
Copy link
Contributor Author

The test scripts I run locally recreate the virtualenv each time, so it should always be the same version.

But pinning the version is a good idea. We don't all PRs to start failing at the same time every time mypy is updated. Pinning to v0.590 fixes the issue.

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

No branches or pull requests

2 participants