Open
Description
Looks like mypy can't infer generic parameter properly when used in attrs converter.
from attr import attrs, attrib
from typing import FrozenSet, Text
@attrs
class Test(object):
values = attrib(type=FrozenSet[Text], converter=frozenset)
Test(values={'a'})
Actual: reporting error
error: Argument 1 to <set> has incompatible type "str"; expected "_T"
Expected: no errors.
mypy version 0.770, python 3.5.2, no flags are used.
Latest master has basically the same error message except generic param has a different name:
error: Argument 1 to <set> has incompatible type "str"; expected "_T_co"
Possibly related: #5313