chore: fix linter errors (#25996)
This commit is contained in:
parent
05b5c197ae
commit
c27e5fdbb6
6 changed files with 37 additions and 20 deletions
|
@ -12,7 +12,8 @@ def read_patch(patch_dir, patch_filename):
|
|||
patch_path = os.path.join(patch_dir, patch_filename)
|
||||
with codecs.open(patch_path, encoding='utf-8') as f:
|
||||
for l in f.readlines():
|
||||
if not added_filename_line and (l.startswith('diff -') or l.startswith('---')):
|
||||
line_has_correct_start = l.startswith('diff -') or l.startswith('---')
|
||||
if not added_filename_line and line_has_correct_start:
|
||||
ret.append('Patch-Filename: {}\n'.format(patch_filename))
|
||||
added_filename_line = True
|
||||
ret.append(l)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue