summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Alburquerque <jaalburqu@svn.gnome.org>2010-04-11 16:15:01 -0400
committerJosé Alburquerque <jaalburqu@svn.gnome.org>2010-04-11 16:16:22 -0400
commita2fcdecbb5e109da5568084d7acb2332af83b6f5 (patch)
tree4d10cc72a3b0e340c4b9574b9757dbfd9754d38b
parent825fd305f03b726665edca34963978ce27448182 (diff)
downloadpygobject-a2fcdecbb5e109da5568084d7acb2332af83b6f5.tar.gz
pygobject-a2fcdecbb5e109da5568084d7acb2332af83b6f5.tar.xz
pygobject-a2fcdecbb5e109da5568084d7acb2332af83b6f5.zip
codegen/docextract.py: Stop final section processing on first match.
* codegen/docextract.py (process_final_sections): Modify the final section pattern matching for loop to stop on first match so that it doesn't match both a colon return ('Returns: ...') and a no colon return ('Returns ...') which leads to annotation extraction errors.
-rw-r--r--codegen/docextract.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/codegen/docextract.py b/codegen/docextract.py
index aef0393..eff8c5e 100644
--- a/codegen/docextract.py
+++ b/codegen/docextract.py
@@ -347,6 +347,10 @@ def process_final_sections(fp, line, cur_doc):
# In case more lines need to be appended.
append_func = cur_doc.append_to_description
+ # Stop final section pattern matching for loop since a match
+ # has already been found.
+ break
+
# Remove the no colon return pattern (which was temporarily added in
# the just executed loop) from the list of final section patterns.
final_section_patterns.pop()