diff options
author | Colin Walters <walters@verbum.org> | 2013-05-07 18:41:48 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-05-07 18:41:48 -0400 |
commit | 4613390bcfd6a814685a5862925b11338b797e48 (patch) | |
tree | 18dcafb8f3ece4a46bceba8e525991ea65e4240a /giscanner/maintransformer.py | |
parent | c9e2d880011c530ff1454fe31a2d40d189860be5 (diff) | |
download | gobject-introspection-4613390bcfd6a814685a5862925b11338b797e48.tar.gz |
scanner: Only warn about signal parameters if there are some
We don't want to emit a warning if there are actually no parameters.
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r-- | giscanner/maintransformer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index 6acc5947..11bfb4cb 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -797,7 +797,9 @@ class MainTransformer(object): # phase we can refer to them while resolving annotations. for i, param in enumerate(signal.parameters): param.argname, tag = names[i + 1] - else: + elif len(signal.parameters) != 0: + # Only warn about missing params if there are actually parameters + # besides implicit self. message.warn("incorrect number of parameters in comment block, " "parameter annotations will be ignored.", block.position) |