Open
Description
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