giscanner: drop dead code
authorDieter Verfaillie <dieterv@optionexplicit.be>
Wed, 21 Nov 2012 16:50:55 +0000 (17:50 +0100)
committerDieter Verfaillie <dieterv@optionexplicit.be>
Wed, 28 Nov 2012 20:31:22 +0000 (21:31 +0100)
DocOptions already has a position attribute, no need to overwrite it
when the position of DocBlock or DocTag is set, hence the
set_position methods are no longer needed.

https://bugzilla.gnome.org/show_bug.cgi?id=688897

giscanner/annotationparser.py

index 28db1a3..0e7e91b 100644 (file)
@@ -154,10 +154,6 @@ class DocBlock(object):
     def __repr__(self):
         return '<DocBlock %r %r>' % (self.name, self.options)
 
-    def set_position(self, position):
-        self.position = position
-        self.options.position = position
-
     def get_tag(self, name):
         return self.tags.get(name)
 
@@ -309,10 +305,6 @@ class DocTag(object):
                 value_str), self.position)
             return
 
-    def set_position(self, position):
-        self.position = position
-        self.options.position = position
-
     def _get_gtk_doc_value(self):
         def serialize_one(option, value, fmt, fmt2):
             if value:
@@ -679,7 +671,7 @@ class AnnotationParser(object):
                     in_part = PART_IDENTIFIER
 
                     comment_block = DocBlock(identifier_name)
-                    comment_block.set_position(position)
+                    comment_block.position = position
 
                     if 'colon' in result.groupdict() and result.group('colon') != ':':
                         colon_start = result.start('colon')
@@ -749,7 +741,7 @@ class AnnotationParser(object):
                                  position)
 
                 tag = DocTag(comment_block, param_name)
-                tag.set_position(position)
+                tag.position = position
                 tag.comment = param_description
                 if param_annotations:
                     tag.options = self.parse_options(tag, param_annotations)