Index: tests/test_fixers.py =================================================================== --- tests/test_fixers.py (revision 57982) +++ tests/test_fixers.py (working copy) @@ -1527,6 +1527,16 @@ s = """lambda x: x + 5""" self.unchanged(s) + def test_lambda_single_nontuple_argument_inside_parenthesis(self): + b = """lambda (x): x""" + a = """lambda x: x""" + self.check(b, a) + + def test_lambda_single_tuple_argument_inside_parenthesis(self): + b = """lambda (x,): x""" + a = """lambda x1: x1[0]""" + self.check(b, a) + def test_lambda_simple(self): b = """lambda (x, y): x + f(y)""" a = """lambda x_y: x_y[0] + f(x_y[1])""" Index: fixes/fix_tuple_params.py =================================================================== --- fixes/fix_tuple_params.py (revision 57982) +++ fixes/fix_tuple_params.py (working copy) @@ -99,6 +99,12 @@ body = results["body"] params = find_params(args) + if not isinstance(params, list): + new_param = Name(params) + new_param.set_prefix(args.get_prefix()) + args.replace(new_param.clone()) + return + to_index = map_to_index(params) tup_name = self.new_name(tuple_name(params))