Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[not-an-iterable] Add regression test for uninferable instances #9264

Merged
merged 1 commit into from
Nov 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/functional/i/iterable_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ def test(*args):
for i in 10: # [not-an-iterable]
pass


# skip uninferable instances
# skip uninferable bases
from some_missing_module import Iterable

class MyClass(Iterable):
Expand All @@ -127,6 +126,11 @@ class MyClass(Iterable):
for i in m:
print(i)

# skip uninferable instances
ambiguous = range(i) or range(i)
for j in ambiguous:
print(j)

# skip checks if statement is inside mixin/base/abstract class
class ManagedAccessViewMixin:
access_requirements = None
Expand Down