Skip to content

Commit 56a9657

Browse files
[not-an-iterable] Add regression test for uninferable instances (#9264)
1 parent 5e1455a commit 56a9657

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/functional/i/iterable_context.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ def test(*args):
116116
for i in 10: # [not-an-iterable]
117117
pass
118118

119-
120-
# skip uninferable instances
119+
# skip uninferable bases
121120
from some_missing_module import Iterable
122121

123122
class MyClass(Iterable):
@@ -127,6 +126,11 @@ class MyClass(Iterable):
127126
for i in m:
128127
print(i)
129128

129+
# skip uninferable instances
130+
ambiguous = range(i) or range(i)
131+
for j in ambiguous:
132+
print(j)
133+
130134
# skip checks if statement is inside mixin/base/abstract class
131135
class ManagedAccessViewMixin:
132136
access_requirements = None

0 commit comments

Comments
 (0)