Open
Description
When running mypy
over the following file:
from typing import Sequence
import attr
@attr.s
class A:
a: Sequence[str] = attr.ib(converter=list)
A(["a"])
I get:
$ mypy a.py
a.py:7: error: List item 0 has incompatible type "str"; expected "_T"
which is a little confusing, because str
should work fine here. This is with mypy 0.782
and on Python 3.6.