mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-04-25 16:24:03 +08:00
097e9f5e71
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.