summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 8954fa70..da904cfd 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -653,7 +653,8 @@ class MainTransformer(object):
node.optional = True
if ANN_ALLOW_NONE in annotations:
- if node.direction == ast.PARAM_DIRECTION_OUT:
+ if (node.direction == ast.PARAM_DIRECTION_OUT and
+ not isinstance(node, ast.Return)):
node.optional = True
else:
node.nullable = True