[gobject-introspection/wip/meson] giscanner: Maintain python2 compat in annotationparser
- From: Nirbheek Chauhan <nirbheekc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/wip/meson] giscanner: Maintain python2 compat in annotationparser
- Date: Fri, 8 Dec 2017 19:12:29 +0000 (UTC)
commit 23ae5398d73139c81a87e47f19efe0e815ac0156
Author: Nirbheek Chauhan <nirbheek centricular 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.
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]