Lines Matching full:replacement
33 # replacement string for file.original_content[start:end]
34 replacement: str
95 def sub(self, original: str, replacement: str) -> str:
103 return original.replace(self.group(0), replacement)
109 def replacement(self) -> Optional[str]: member in FileMatch
110 """Return replacement text for pattern, to use new code conventions"""
113 def make_patch(self, replacement: str) -> 'Patch':
115 return Patch(self.start(), self.end(), replacement)
117 def make_subpatch(self, start: int, end: int, replacement: str) -> 'Patch':
118 return Patch(self.start() + start, self.start() + end, replacement)
134 replacement = self.replacement()
135 if replacement is not None:
136 yield self.make_patch(replacement)
141 or klass.replacement is not FileMatch.replacement)
254 p.replacement)
259 r.write(p.replacement)
367 self.line_col(p.start), self.line_col(p.end), p.replacement)