Skip to content

Add regression tests for inference bug repros #4387

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

Merged
merged 2 commits into from
Mar 30, 2025
Merged
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions tests/functional/r/regression_02/regression_dynamic_getitiem.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# pylint: disable=missing-docstring,too-few-public-methods

class DynamicGetitem:
def __getitem__(self, key):
if key == 'attributes':
return []
return {'world': 123}


ex = DynamicGetitem()
a = ex['hello']['world'] # [invalid-sequence-index] known false-positive
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invalid-sequence-index:11:4:11:24::Sequence index is not an int, slice, or instance with __index__:UNDEFINED
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# pylint: disable=missing-docstring

data = {
'abc': None,
}
data['abc'] = lambda: print("Callback called")
data['abc']() # [not-callable] known false-positive
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
not-callable:7:0:7:13::data['abc'] is not callable:UNDEFINED
Loading