Skip to content

Commit cd7c012

Browse files
nelfinPierre-Sassoulas
authored andcommitted
Add regression test of not-callable false-positive
Ref pylint-dev/astroid#946 (comment)
1 parent c236745 commit cd7c012

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# pylint: disable=missing-docstring
2+
3+
data = {
4+
'abc': None,
5+
}
6+
data['abc'] = lambda: print("Callback called")
7+
data['abc']() # [not-callable] known false-positive
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
not-callable:7:0:7:13::data['abc'] is not callable:UNDEFINED

0 commit comments

Comments
 (0)