mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-25 05:11:09 +08:00
A call like this: ``` from attr import attrib from attr.validators import optional, instance_of c = attrib(default=None, validator=optional(instance_of(bytes))) ``` Was returning no return value, because the first overload was T -> T. The solution was to change the ordering so that the first overload is None -> T and infer the type from the other arguments.