[gobject-introspection/wip/doctool-improvements: 11/14] doc: Make the Python declarations look a tiny bit nicer



commit b14f0e075a8c01bc9612006af7d5ffffdfa6e7aa
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jan 9 02:42:39 2013 -0500

    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.

 giscanner/mallard-Python-function.tmpl             |    3 ++-
 .../DocExamples.Obj.method.page                    |    3 ++-
 .../DocExamples.Obj.static_method.page             |    3 ++-
 .../DocExamples.array_function.page                |    3 ++-
 .../DocExamples.callback_function.page             |    3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/giscanner/mallard-Python-function.tmpl b/giscanner/mallard-Python-function.tmpl
index 496f3ae..9ccc723 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 603fb46..3a20d14 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 8897c78..1ace519 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 d552e17..3a0d054 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 0b6a15c..f1b4905 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]