mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-08 19:00:59 +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.