summaryrefslogtreecommitdiff
path: root/giscanner/docwriter.py
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-02-14 22:15:30 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-14 23:18:00 -0500
commit9c8a86bb6740a3ca10eb58797d09c657acb64d4b (patch)
tree0af382f4d820255ba5e6d872b20862418a586ddc /giscanner/docwriter.py
parentc5bb3d0693739b3ffc2657ad2522cf0e752b0d38 (diff)
downloadgobject-introspection-9c8a86bb6740a3ca10eb58797d09c657acb64d4b.tar.gz
docwriter: Format list types as if they are arrays
Language bindings don't actually care
Diffstat (limited to 'giscanner/docwriter.py')
-rw-r--r--giscanner/docwriter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index 8a03aefe..9d0d5b8f 100644
--- a/giscanner/docwriter.py
+++ b/giscanner/docwriter.py
@@ -448,7 +448,7 @@ class DocFormatterPython(DocFormatter):
return fundamental_types.get(name, name)
def format_type(self, type_):
- if isinstance(type_, ast.Array):
+ if isinstance(type_, (ast.List, ast.Array)):
return '[' + self.format_type(type_.element_type) + ']'
elif isinstance(type_, ast.Map):
return '{%s: %s}' % (self.format_type(type_.key_type),
@@ -517,7 +517,7 @@ class DocFormatterGjs(DocFormatter):
return fundamental_types.get(name, name)
def format_type(self, type_):
- if isinstance(type_, ast.Array):
+ if isinstance(type_, (ast.List, ast.Array)):
return '[' + self.format_type(type_.element_type) + ']'
elif isinstance(type_, ast.Map):
return '{%s: %s}' % (self.format_type(type_.key_type),