[gobject-introspection/wip/meson] giscanner: Maintain python2 compat in annotationparser



commit fb3c35bdf30c8d26d50c108d6e7501e4955703d7
Author: Mikhail Fludkov <misha pexip com>
Date:   Sat Dec 9 00:41:04 2017 +0530

    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>

 giscanner/annotationparser.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index 79d5212..1b82b35 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]