Skip to content
Permalink
Browse files

argument-clinic: Simplify multi-line string handling (GH-17852)

  • Loading branch information
corona10 authored and pablogsal committed Jan 6, 2020
1 parent ee94bdb commit 5136e721d7d9eae62ffad17328566b2315e42c00
Showing with 2 additions and 2 deletions.
  1. +2 −2 Tools/clinic/clinic.py
@@ -1182,14 +1182,14 @@ def render_option_group_parsing(self, f, template_dict):
lines = [self.group_to_variable_name(g) + " = 1;" for g in group_ids]
lines = "\n".join(lines)

s = """
s = """\
case {count}:
if (!PyArg_ParseTuple(args, "{format_units}:{name}", {parse_arguments})) {{
goto exit;
}}
{group_booleans}
break;
"""[1:]
"""
s = linear_format(s, group_booleans=lines)
s = s.format_map(d)
add(s)

0 comments on commit 5136e72

Please sign in to comment.
You can’t perform that action at this time.