Skip to content
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

Mypy cannot determine type of op_debug_information #1221

Closed
brandonwillard opened this issue Sep 29, 2022 · 5 comments · Fixed by #1343
Closed

Mypy cannot determine type of op_debug_information #1221

brandonwillard opened this issue Sep 29, 2022 · 5 comments · Fixed by #1343
Labels
CI Involves continuous integration important testing typing Work related to type checking

Comments

@brandonwillard
Copy link
Member

brandonwillard commented Sep 29, 2022

MyPy run by pre-commit will occasionally err with the following:

aesara/scan/op.py:3443: error: Cannot determine type of "op_debug_information"  [has-type]
Found 1 error in 1 file (checked 1 source file)

This issue appears to be due to differences in command-line module ordering (see pre-commit/pre-commit#1580 (comment), pypa/pip#9502 (comment), and python/mypy#9954).

Let's see if we can remove this ordering disparity, because it's awfully annoying.

@brandonwillard brandonwillard added testing important CI Involves continuous integration typing Work related to type checking labels Sep 29, 2022
@brandonwillard
Copy link
Member Author

brandonwillard commented Sep 29, 2022

@LegrandNico and @markusschmaus, have either of you run into this before, and, if so, do you have any ideas?

@LegrandNico
Copy link
Contributor

I cannot reproduce the error on my side, both mypy and pre-commit are running correctly, but this could be due to pre-commit virtual env not updating correctly for some reason. I experienced something similar with typing extensions and I had to delete the pre-commit env folder to re-install it.

@brandonwillard brandonwillard changed the title MyPy cannot determine type of "op_debug_information" Mypy cannot determine type of op_debug_information Oct 5, 2022
@brandonwillard
Copy link
Member Author

I cannot reproduce the error on my side, both mypy and pre-commit are running correctly, but this could be due to pre-commit virtual env not updating correctly for some reason. I experienced something similar with typing extensions and I had to delete the pre-commit env folder to re-install it.

Yeah, it's not consistent for me either, which is what makes this so challenging.

@ricardoV94
Copy link
Contributor

I get this error every single time. I've tried to clear the cache / reinstall pre-commit without success.

@rlouf
Copy link
Member

rlouf commented Oct 18, 2022

I see it in #1168 randomly as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Involves continuous integration important testing typing Work related to type checking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants