summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Fludkov <misha@pexip.com>2017-12-09 00:41:04 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-03-10 19:05:19 +0530
commitd0104729f790ba9733a71d4cb62a67366bdbc133 (patch)
treec367d50f0628dd0b899d8d8d048d5f4f39887b44
parentdaf5d25083221c065ff8667fc7ee72ffbf9d5d07 (diff)
downloadgobject-introspection-d0104729f790ba9733a71d4cb62a67366bdbc133.tar.gz
giscanner: Maintain python2 compat in annotationparser
Mixing ** and explicit keyword arguments is not allowed in Python 2. Signed-off-by: Nirbheek Chauhan <nirbheek@centricular.com>
-rw-r--r--giscanner/annotationparser.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index 79d5212f..1b82b355 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -518,12 +518,12 @@ class GtkDocAnnotations(OrderedDict):
__slots__ = ('position')
- def __init__(self, *args, position=None, **kwargs):
- OrderedDict.__init__(self, *args, **kwargs)
-
+ def __init__(self, *args, **kwargs):
#: A :class:`giscanner.message.Position` instance specifying the location of the
#: annotations in the source file or :const:`None`.
- self.position = position
+ self.position = kwargs.pop('position', None)
+
+ OrderedDict.__init__(self, *args, **kwargs)
def __copy__(self):
return GtkDocAnnotations(self, position=self.position)