Esempio n. 1
0
 def filterReferenceAnnotationByType(self, a, group):
     filtered = [
         annotation.annotationSet(
             [ref for ref in crefs if self.typeMatch(ref, group)])
         for crefs in a.references.context
     ]
     filtered = annotation.makeContextualAnnotation(filtered)
     return a.rewrite(references=filtered)
Esempio n. 2
0
def annotationFromValues(code, values):
    values = annotation.annotationSet(values)
    return annotation.ContextualAnnotation(values, tuple([values for _context in code.annotation.contexts]))
Esempio n. 3
0
	def filterReferenceAnnotationByType(self, a, group):
		filtered = [annotation.annotationSet([ref for ref in crefs if self.typeMatch(ref, group)])
				for crefs in a.references.context]
		filtered = annotation.makeContextualAnnotation(filtered)
		return a.rewrite(references=filtered)