[gobject-introspection] giscanner: tiny MainTransformer cleanup
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner: tiny MainTransformer cleanup
- Date: Wed, 9 Oct 2013 16:55:48 +0000 (UTC)
commit 4e48635343409b5647d2b4b3ac59c26bef45fb18
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Thu May 23 07:26:30 2013 +0200
giscanner: tiny MainTransformer cleanup
giscanner/maintransformer.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index a614b34..c0fc763 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -215,7 +215,7 @@ class MainTransformer(object):
for field in node.fields:
self._apply_annotations_field(node, block, field)
name = self._get_annotation_name(node)
- section_name = 'SECTION:' + name.lower()
+ section_name = 'SECTION:%s' % (name.lower(), )
block = self._blocks.get(section_name)
if block:
node.doc = block.comment if block.comment else ''
@@ -240,12 +240,9 @@ class MainTransformer(object):
return True
def _adjust_container_type(self, parent, node, options):
- has_element_type = OPT_ELEMENT_TYPE in options
- has_array = OPT_ARRAY in options
-
- if has_array:
+ if OPT_ARRAY in options:
self._apply_annotations_array(parent, node, options)
- elif has_element_type:
+ elif OPT_ELEMENT_TYPE in options:
self._apply_annotations_element_type(parent, node, options)
if isinstance(node.type, ast.Array):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]