From edb4146278f74030fba9bfd79e21f070f24d4434 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 29 Aug 2011 21:51:34 -0400 Subject: Fix warning for missing (element-type) While looking for a different bug, I noticed that the introspectable pass lists was missing GSList. And the warning was never set up to fire anyways. Fix it and add a test. --- giscanner/introspectablepass.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'giscanner/introspectablepass.py') diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py index ebb1dedc..95d54b0a 100644 --- a/giscanner/introspectablepass.py +++ b/giscanner/introspectablepass.py @@ -84,8 +84,8 @@ class IntrospectablePass(object): parent.introspectable = False return - if not isinstance(node.type, ast.List) and \ - (node.type.target_giname == 'GLib.List'): + if (isinstance(node.type, ast.List) + and node.type.element_type == ast.TYPE_ANY): self._parameter_warning(parent, node, "Missing (element-type) annotation") parent.introspectable = False return -- cgit v1.2.1