summaryrefslogtreecommitdiffstats
path: root/Tools/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-23 21:40:51 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-23 21:40:51 (GMT)
commit247789cee99c8933c140110791d136cbe37a003b (patch)
treeb29885b10378b1b31f51609bf719bd4f6c7de306 /Tools/clinic
parenta30e2256f70bd43255e8dae6459c70540f118b62 (diff)
downloadcpython-247789cee99c8933c140110791d136cbe37a003b.zip
cpython-247789cee99c8933c140110791d136cbe37a003b.tar.gz
cpython-247789cee99c8933c140110791d136cbe37a003b.tar.bz2
Issue #24007: Argument Clinic now writes the format of PyArg_Parse*() at the
same line as function name.
Diffstat (limited to 'Tools/clinic')
-rwxr-xr-xTools/clinic/clinic.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index ba7cb88..5626dd9 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -786,9 +786,7 @@ class CLanguage(Language):
""" % argname)
parser_definition = parser_body(parser_prototype, normalize_snippet("""
- if (!PyArg_Parse(%s,
- "{format_units}:{name}",
- {parse_arguments}))
+ if (!PyArg_Parse(%s, "{format_units}:{name}", {parse_arguments}))
goto exit;
""" % argname, indent=4))
@@ -825,8 +823,7 @@ class CLanguage(Language):
parser_prototype = parser_prototype_varargs
parser_definition = parser_body(parser_prototype, normalize_snippet("""
- if (!PyArg_ParseTuple(args,
- "{format_units}:{name}",
+ if (!PyArg_ParseTuple(args, "{format_units}:{name}",
{parse_arguments}))
goto exit;
""", indent=4))
@@ -838,14 +835,12 @@ class CLanguage(Language):
parser_prototype = parser_prototype_keyword
body = normalize_snippet("""
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "{format_units}:{name}", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "{format_units}:{name}", _keywords,
{parse_arguments}))
goto exit;
""", indent=4)
parser_definition = parser_body(parser_prototype, normalize_snippet("""
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "{format_units}:{name}", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "{format_units}:{name}", _keywords,
{parse_arguments}))
goto exit;
""", indent=4))