3 ms·
An example of where mypy chokes: def foo(data: list[str]): r = [] # error: Need type annotation for key in data: r.appen
by dataflow 4y ago
An example of where mypy chokes:
def foo(data: list[str]):
r = [] # error: Need type annotation
for key in data:
r.append(key if len(r) > 0 else '')
return r