Coding style

- Use staticmethod where possible.
This commit is contained in:
Andrew Hamilton 2022-05-28 22:37:57 +10:00
parent 2e96cede00
commit 5b2021c132
2 changed files with 4 additions and 2 deletions

View file

@ -165,7 +165,8 @@ class DiffEditor:
with contextlib.suppress(AttributeError):
del self.diff
def _highlight_lines(self, appearance, start, end, opcode, change_opcode):
@staticmethod
def _highlight_lines(appearance, start, end, opcode, change_opcode):
if opcode == change_opcode:
for index in range(start, end):
appearance[index] = highlight_str(appearance[index], (0, 200, 0), 0.6)