-
Notifications
You must be signed in to change notification settings - Fork 93
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
SONARPY-2385 Add test for S5756 about uncallable lambda #2215
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, probably it makes sense to also add a test case with another parenthesis configuration:
def foo():
return "hello"
x = (lambda : foo())() # here is ok cause it is a lambda call
print(x)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to discuss the naming and probably add more test cases
@@ -407,3 +407,6 @@ def function_type_is_callable(): | |||
def object_typevar(): | |||
scheduled = [] | |||
scheduled.pop()() # OK | |||
|
|||
def uncallable_lambda_are_non_compliant(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to non-callable inside lamda
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
SONARPY-2385