We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pontos-update-header
2 parents 51d106e + 5091b8d commit bd11228Copy full SHA for bd11228
pontos/updateheader/updateheader.py
@@ -184,6 +184,10 @@ def _update_file(
184
fp.seek(fp_write)
185
fp.write(new_line)
186
fp.write(rest_of_file)
187
+ # in some cases we replace "YYYY - YYYY" with "YYYY-YYYY"
188
+ # resulting in 2 characters left at the end of the file
189
+ # so we truncate the file, just in case!
190
+ fp.truncate()
191
print(
192
f"{file}: Changed Licence Header Copyright Year "
193
f'{copyright_match["modification_year"]} -> '
0 commit comments