Skip to content

Commit 4d80324

Browse files
SONARPY-2385 Add test for S5756 about uncallable lambda (#2215)
1 parent 49a184c commit 4d80324

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python-checks/src/test/resources/checks/nonCallableCalled.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,3 +407,7 @@ def function_type_is_callable():
407407
def object_typevar():
408408
scheduled = []
409409
scheduled.pop()() # OK
410+
411+
def uncallable_inside_lambda_are_non_compliant():
412+
lambda_call = (lambda : print("something"))() # OK
413+
uncallable_inside_lambda = lambda:(print("something"))() # Noncompliant

0 commit comments

Comments
 (0)