diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-01-09 02:42:39 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-01-09 03:16:14 -0500 |
commit | b14f0e075a8c01bc9612006af7d5ffffdfa6e7aa (patch) | |
tree | 22ad19f0332560ad3991b2e583a96827c913aafb | |
parent | fb69b6c36e96868f051974f3262f26670fb21857 (diff) | |
download | gobject-introspection-b14f0e075a8c01bc9612006af7d5ffffdfa6e7aa.tar.gz |
doc: Make the Python declarations look a tiny bit nicer
Add a colon after the def, and add a comment describing what this
is a wrapper for.
5 files changed, 10 insertions, 5 deletions
diff --git a/giscanner/mallard-Python-function.tmpl b/giscanner/mallard-Python-function.tmpl index 496f3ae9..9ccc723c 100644 --- a/giscanner/mallard-Python-function.tmpl +++ b/giscanner/mallard-Python-function.tmpl @@ -62,7 +62,8 @@ ${arg.argname}\ , \ %endif % endfor -) +): + # Python wrapper for ${node.symbol}() </code></synopsis> ${formatter.format(node, node.doc)} diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page index 603fb46c..3a20d14c 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page @@ -43,7 +43,8 @@ <synopsis><code mime="text/x-python"> @accepts(gint, gfloat, gboolean, gpointer, utf8) @returns(gboolean) -def method(first_arg, second_arg, boolean_arg, pointer_arg, string) +def method(first_arg, second_arg, boolean_arg, pointer_arg, string): + # Python wrapper for doc_examples_obj_method() </code></synopsis> <p>This is an example of how to document a method.</p><p>You should call this on a <link xref="DocExamples.Obj">DocExamples.Obj</link> that was created with <link xref="DocExamples.Obj.new">Obj.new</link>.</p><p>This should be a %FALSEALARM.</p> diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page index 8897c785..1ace5190 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page @@ -23,7 +23,8 @@ <synopsis><code mime="text/x-python"> @accepts(gint) @returns(gboolean) -def static_method(out_arg) +def static_method(out_arg): + # Python wrapper for doc_examples_obj_static_method() </code></synopsis> <p>This is an example of a function with an out argument and a return value.</p> diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page index d552e178..3a0d0549 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page @@ -23,7 +23,8 @@ <synopsis><code mime="text/x-python"> @accepts(gint) @returns([gint]) -def array_function(out_len) +def array_function(out_len): + # Python wrapper for doc_examples_array_function() </code></synopsis> <p>This function returns an array with an explicit length, and the length should be invisible in most introspected bindings.</p> diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.callback_function.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.callback_function.page index 0b6a15cb..f1b49051 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.callback_function.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.callback_function.page @@ -31,7 +31,8 @@ <synopsis><code mime="text/x-python"> @accepts(DocExamples.Callback, gpointer, GLib.DestroyNotify) @returns(none) -def callback_function(callback, user_data, destroy_notify) +def callback_function(callback, user_data, destroy_notify): + # Python wrapper for doc_examples_callback_function() </code></synopsis> <p>This is a function that takes a callback. Different languages will expose this in different ways (e.g. Python keeps the |