-
-
Notifications
You must be signed in to change notification settings - Fork 384
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 false positive for union validator #1336
Comments
That doesn’t sound familiar and should be easy to fix. 🤞 |
I think, to be completely correct from a static typing perspective,
In that case, Mypy and Pyright think it's a I don't remember off the top of my head why you're not supposed to just use But if you were to just use the union inline:
Then the argument to |
Not sure if this is a duplicate but I couldn't find the problem in the open issues. If I overlooked it, please close, of course.
Works perfectly but
mypy
complains about:The text was updated successfully, but these errors were encountered: