double-quote-string-fixer

This commit is contained in:
Anthony Sottile 2019-02-11 19:57:37 -08:00
parent 4575652bd2
commit 8626e266dd
8 changed files with 27 additions and 26 deletions

View file

@ -147,5 +147,5 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
return retv
if __name__ == "__main__":
if __name__ == '__main__':
exit(main())

View file

@ -115,9 +115,9 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
new_lines = sort(lines)
if lines != new_lines:
print("Fixing file `{filename}`".format(filename=filename))
print('Fixing file `{filename}`'.format(filename=filename))
f.seek(0)
f.write("\n".join(new_lines) + "\n")
f.write('\n'.join(new_lines) + '\n')
f.truncate()
retval = 1

View file

@ -69,7 +69,7 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
for ext in md_exts:
if any(c in ext[1:] for c in r'./\:'):
parser.error(
"bad --markdown-linebreak-ext extension {!r} (has . / \\ :)\n"
'bad --markdown-linebreak-ext extension {!r} (has . / \\ :)\n'
" (probably filename; use '--markdown-linebreak-ext=EXT')"
.format(ext),
)