Ejemplo n.º 1
0
 def file_level_annotations(self):
     """Obtain inferred file level annotations."""
     if self._file_level_annotations:
         return self._file_level_annotations
     self._file_level_annotations = dict(
         sum([
             list(annotations.extract_annotations(c).items()) for c in self.file_level_comments
         ], []))
     return self._file_level_annotations
Ejemplo n.º 2
0
 def __init__(self, comment, file_level_annotations=None):
     self.raw = comment
     self.file_level_annotations = file_level_annotations
     self.annotations = annotations.extract_annotations(self.raw, file_level_annotations)