diff options
author | Colin Walters <walters@verbum.org> | 2015-09-27 16:02:26 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-09-27 16:02:26 -0400 |
commit | ea73b39cfc230e5cb8e5c56ffc83988c573a9513 (patch) | |
tree | c8345274c70a9b873716f99e804ef0ade525f0af /giscanner | |
parent | 7c37a16ade424cf063414ce0dd4d170fd2f9c9b1 (diff) | |
download | gobject-introspection-ea73b39cfc230e5cb8e5c56ffc83988c573a9513.tar.gz |
scanner: Tweak "invalid transfer" warning to show type too
Should help debugging.
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/maintransformer.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index 6c0429da..8fb37f89 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -567,16 +567,16 @@ class MainTransformer(object): transfer = OPT_TRANSFER_NONE if not isinstance(target, (ast.Class, ast.Interface)): - message.warn('invalid "transfer" annotation: ' - 'only valid for object and interface types', + message.warn('invalid "transfer" annotation for {0}: ' + 'only valid for object and interface types'.format(target), annotations.position) return elif transfer == OPT_TRANSFER_CONTAINER: if (ANN_ARRAY not in annotations and not isinstance(target, (ast.Array, ast.List, ast.Map))): - message.warn('invalid "transfer" annotation: ' - 'only valid for container types', + message.warn('invalid "transfer" annotation for {0}: ' + 'only valid for container types'.format(target), annotations.position) return @@ -585,9 +585,9 @@ class MainTransformer(object): not isinstance(target, (ast.Array, ast.List, ast.Map, ast.Record, ast.Compound, ast.Boxed, ast.Class, ast.Interface))): - message.warn('invalid "transfer" annotation: ' + message.warn('invalid "transfer" annotation for {0}: ' 'only valid for array, struct, union, boxed, ' - 'object and interface types', + 'object and interface types'.format(target), annotations.position) return |