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
I wish I could write:
validator=attrs.validators.instance_of(typing.Optional[list[int]])
instead of:
validator=attrs.validators.instance_of( attrs.validators.optional(attrs.validators.deep_iterable(int)))
It is easier to read and there is not need to use another differente way to express a type, just the standard python way.
Besides it is an step nearer to autodetect type from standard declaration and no need to tell it again in attr deffinition:
@attrs.define class Myclass: _myattr: typing.Optional[list[int]] = attrs.field()
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I wish I could write:
validator=attrs.validators.instance_of(typing.Optional[list[int]])
instead of:
It is easier to read and there is not need to use another differente way to express a type, just the standard python way.
Besides it is an step nearer to autodetect type from standard declaration and no need to tell it again in attr deffinition:
Thanks
The text was updated successfully, but these errors were encountered: