Skip to content

Commit bec818e

Browse files
committed
Remove duplication from conversion script
1 parent a6c32b0 commit bec818e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scripts/reformat_docs.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,7 @@ def replace_block(
206206
if header_formatter.is_block_valid(block):
207207
converted = header_formatter.convert(header_from_block(block))
208208
if header_formatter.needs_new_header(file_contents) and converted:
209-
return '%s%s' % (
210-
block_contents.group(0),
211-
header_formatter.convert(header_from_block(block)) + '\n')
209+
return block_contents.group(0) + converted + '\n'
212210
return block_contents.group(0)
213211

214212
if class_formatter.is_block_valid(block):

0 commit comments

Comments
 (0)