Fixing bug when encountering tuple params
Change-Id: Id6cef580083747c31bef149251080be35ab2680a Closes-bug: 1511767
This commit is contained in:
parent
6b19466d9c
commit
a5618ba216
|
@ -75,6 +75,7 @@ def hardcoded_password_default(context):
|
|||
|
||||
# go through all (param, value)s and look for candidates
|
||||
for key, val in zip(context.node.args.args, defs):
|
||||
check = key.arg if sys.version_info.major > 2 else key.id # Py3
|
||||
if isinstance(val, ast.Str) and check in candidates:
|
||||
return _report(val.s)
|
||||
if isinstance(key, ast.Name):
|
||||
check = key.arg if sys.version_info.major > 2 else key.id # Py3
|
||||
if isinstance(val, ast.Str) and check in candidates:
|
||||
return _report(val.s)
|
||||
|
|
|
@ -16,3 +16,7 @@ def NoMatch2(password):
|
|||
doLogin(password="blerg")
|
||||
password = "blerg"
|
||||
d["password"] = "blerg"
|
||||
|
||||
|
||||
def NoMatch3((a, b)):
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue