diff options
-rw-r--r-- | giscanner/maintransformer.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index d957a1f0..8fad0d70 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -582,8 +582,9 @@ class MainTransformer(object): if ANN_ALLOW_NONE in annotations: node.allow_none = True - if (node.type.target_giname == 'Gio.AsyncReadyCallback' or - node.type.target_giname == 'Gio.Cancellable'): + if (node.direction == ast.PARAM_DIRECTION_IN and + (node.type.target_giname == 'Gio.AsyncReadyCallback' or + node.type.target_giname == 'Gio.Cancellable')): node.allow_none = True if tag and tag.description: |