diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2019-01-09 23:07:00 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2019-01-09 23:16:55 +0100 |
commit | 4f1374ba76d919c4e0d69c8a542f184d9d10df08 (patch) | |
tree | 92aaf30998ae841d8386016cbb6b27edc83529be /giscanner | |
parent | 19e1c72db3ac4436cbb68dc0fb21c79c5f13e74b (diff) | |
download | gobject-introspection-4f1374ba76d919c4e0d69c8a542f184d9d10df08.tar.gz |
maintransformer: parse deprecation annotations for section blocks. Fixes #213
The scanner matches gtk-doc sections which match the lower case type name
to the type and uses that for the type documentation. The only problem is
it only takes the docs and none of the other annotations like deprecation
info etc.
This changes things to also parse the annotations in that case and adds some
tests while at it.
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/maintransformer.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index b67dcb7f..a448d9d5 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -229,9 +229,7 @@ class MainTransformer(object): name = self._get_annotation_name(node) section_name = 'SECTION:%s' % (name.lower(), ) block = self._blocks.get(section_name) - if block and block.description: - node.doc = block.description - node.doc_position = block.position + self._apply_annotations_annotated(node, block) if isinstance(node, (ast.Class, ast.Interface)): for prop in node.properties: self._apply_annotations_property(node, prop) |