From d0104729f790ba9733a71d4cb62a67366bdbc133 Mon Sep 17 00:00:00 2001 From: Mikhail Fludkov Date: Sat, 9 Dec 2017 00:41:04 +0530 Subject: giscanner: Maintain python2 compat in annotationparser Mixing ** and explicit keyword arguments is not allowed in Python 2. Signed-off-by: Nirbheek Chauhan --- giscanner/annotationparser.py | 8 ++++---- 1 file 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) -- cgit v1.2.1