Open
Description
Steps to reproduce
- Put this code in test.py:
from typing import List, NewType
a = NewType("a", List[int])
def fun() -> a:
"""Some function."""
data = [1, 2, 3]
return a(data)
def fun1():
"""some function."""
for x in fun():
pass
- Run
pylint test.py
Current behavior
test.py:14:13: E1133: Non-iterable value fun() is used in an iterating context (not-an-iterable)
Expected behavior
pylint --version output
pylint 2.0.0
astroid 2.0.0.dev4
Python 3.6.5 (default, May 3 2018, 10:08:28)
[GCC 5.4.0 20160609]