151 len(context.node.args.defaults)) |
151 len(context.node.args.defaults)) |
152 defs.extend(context.node.args.defaults) |
152 defs.extend(context.node.args.defaults) |
153 |
153 |
154 # go through all (param, value)s and look for candidates |
154 # go through all (param, value)s and look for candidates |
155 for key, val in zip(context.node.args.args, defs): |
155 for key, val in zip(context.node.args.args, defs): |
156 if isinstance(key, ast.Name) or isinstance(key, ast.arg): |
156 if isinstance(key, (ast.Name, ast.arg)): |
157 if AstUtilities.isString(val) and RE_CANDIDATES.search(key.arg): |
157 if AstUtilities.isString(val) and RE_CANDIDATES.search(key.arg): |
158 reportError( |
158 reportError( |
159 context.node.lineno - 1, |
159 context.node.lineno - 1, |
160 context.node.col_offset, |
160 context.node.col_offset, |
161 "S107", |
161 "S107", |