Apply suggestions from code review

Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
yoff
2021-09-03 14:23:57 +02:00
committed by GitHub
parent a855074588
commit c6eb795e76
2 changed files with 9 additions and 3 deletions

View File

@@ -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