mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@ def list_del(l = [0]):
|
||||
|
||||
# Not OK
|
||||
def append_op(l = []):
|
||||
l += 1 #$ modification=l
|
||||
l += [1, 2, 3] #$ modification=l
|
||||
return l
|
||||
|
||||
# Not OK
|
||||
@@ -123,6 +123,6 @@ def dict_update_op_nochange(d = {}):
|
||||
|
||||
# OK
|
||||
def sanitizer(l = []):
|
||||
if not l == []:
|
||||
if l:
|
||||
l.append(1) #$ SPURIOUS: modification=l
|
||||
return l
|
||||
|
||||
Reference in New Issue
Block a user