-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add runtime type checking in CI tests #9745
base: main
Are you sure you want to change the base?
Add runtime type checking in CI tests #9745
Conversation
7c7eee9
to
4b2f732
Compare
4b2f732
to
6891361
Compare
This is a good test! Unfortunately our CI fails, and we couldn't work out a succinct way of changing our annotations so that we could resolve #9581. If there were some way of adding this in part, that would be great. But likely we'll need to wait for more support so we can support this while having just |
6891361
to
0127db9
Compare
Maybe we make it optional, similar to pyright? |
I was planning on exploring the suggestions in #9581. But yes, I could make the test optional for now. |
21779df
to
1c7d925
Compare
This should prevent TYPE_CHECKING misuse. It might also found issues not found by static type checking, typically by the current MyPy. Make it optional for now, while we fix issues.
1c7d925
to
2aaf037
Compare
Is it helpful to have an optional CI which fails everytime at the first import though? |
It looks like solutions that might work with beartype fail with MyPy. I haven't been able to find a solution within the little time I can dedicate to this issue. In any case, it looks like |
This should prevent
TYPE_CHECKING
misuse.Fixes #9744.