summaryrefslogtreecommitdiff
path: root/giscanner/introspectablepass.py
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/introspectablepass.py')
-rw-r--r--giscanner/introspectablepass.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py
index 0de25c8d..cc3a59d3 100644
--- a/giscanner/introspectablepass.py
+++ b/giscanner/introspectablepass.py
@@ -44,16 +44,20 @@ class IntrospectablePass(object):
"""Virtual function %r has no known invoker""" % (vfunc.name, ),
context=node)
- def _parameter_warning(self, parent, param, text, *args):
+ def _parameter_warning(self, parent, param, text, position=None):
if hasattr(parent, 'symbol'):
prefix = '%s: ' % (parent.symbol, )
+ block = self._blocks.get(parent.symbol)
+ if block:
+ position = block.position
else:
prefix = ''
if isinstance(param, ast.Parameter):
context = "argument %s: " % (param.argname, )
else:
context = "return value: "
- message.warn_node(parent, prefix + context + text, *args)
+ message.warn_node(parent, prefix + context + text,
+ positions=position)
def _introspectable_param_analysis(self, parent, node):
is_return = isinstance(node, ast.Return)