diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-12-07 17:15:20 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-03-10 19:05:19 +0530 |
commit | 5c468691b6accb2c3e910931bc0f60f846fe9e89 (patch) | |
tree | abc49c9ead2c790a630df6894f9d58da93602800 /giscanner/annotationparser.py | |
parent | 1a0aa3731cad90ea395a37500ee2bca78f8e95dd (diff) | |
download | gobject-introspection-5c468691b6accb2c3e910931bc0f60f846fe9e89.tar.gz |
giscanner: Fix GtkDocAnnotations implementation
Lesson to be learnt: *NEVER* have a try..except block that catches all
exceptions and turns them into warnings that are silenced by default.
There was a syntax error in this class implementation that made all
annotation parsing fail silently.
Diffstat (limited to 'giscanner/annotationparser.py')
-rw-r--r-- | giscanner/annotationparser.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py index 1092310e..79d5212f 100644 --- a/giscanner/annotationparser.py +++ b/giscanner/annotationparser.py @@ -518,15 +518,15 @@ class GtkDocAnnotations(OrderedDict): __slots__ = ('position') - def __init__(self, position=None, sequence=None): - OrderedDict.__init__(self, sequence) + def __init__(self, *args, position=None, **kwargs): + OrderedDict.__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 def __copy__(self): - return GtkDocAnnotations(self.position, self) + return GtkDocAnnotations(self, position=self.position) class GtkDocAnnotatable(object): @@ -1871,7 +1871,7 @@ class GtkDocCommentBlockParser(object): if parse_options: if annotations is None: - parsed_annotations = GtkDocAnnotations(position) + parsed_annotations = GtkDocAnnotations(position=position) else: parsed_annotations = annotations.copy() else: |