We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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.
from attrs import define, field from attrs.validators import instance_of LeTypeAlias = int | str @define class LeClass: x: LeTypeAlias = field(validator=instance_of(LeTypeAlias))
Works perfectly but mypy complains about:
mypy
error: No overload variant of "instance_of" matches argument type "UnionType[int, str]" [call-overload]
The text was updated successfully, but these errors were encountered:
That doesn’t sound familiar and should be easy to fix. 🤞
Sorry, something went wrong.
No branches or pull requests
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: