argument-clinic: Simplify multi-line string handling (GH-17852)
This commit is contained in:
parent
ee94bdb059
commit
5136e721d7
|
@ -1182,14 +1182,14 @@ class CLanguage(Language):
|
||||||
lines = [self.group_to_variable_name(g) + " = 1;" for g in group_ids]
|
lines = [self.group_to_variable_name(g) + " = 1;" for g in group_ids]
|
||||||
lines = "\n".join(lines)
|
lines = "\n".join(lines)
|
||||||
|
|
||||||
s = """
|
s = """\
|
||||||
case {count}:
|
case {count}:
|
||||||
if (!PyArg_ParseTuple(args, "{format_units}:{name}", {parse_arguments})) {{
|
if (!PyArg_ParseTuple(args, "{format_units}:{name}", {parse_arguments})) {{
|
||||||
goto exit;
|
goto exit;
|
||||||
}}
|
}}
|
||||||
{group_booleans}
|
{group_booleans}
|
||||||
break;
|
break;
|
||||||
"""[1:]
|
"""
|
||||||
s = linear_format(s, group_booleans=lines)
|
s = linear_format(s, group_booleans=lines)
|
||||||
s = s.format_map(d)
|
s = s.format_map(d)
|
||||||
add(s)
|
add(s)
|
||||||
|
|
Loading…
Reference in New Issue