Run black reformatter on code

This commit is contained in:
Griatch 2022-02-08 13:03:52 +01:00
parent 4582eb4085
commit bd3e31bf3c
178 changed files with 4511 additions and 3385 deletions

View file

@ -11,15 +11,15 @@ from os import rename
def _rst2md(filename_rst):
with open(filename_rst, 'r') as fil:
with open(filename_rst, "r") as fil:
# read rst file, reformat and save
txt = fil.read()
with open(filename_rst, 'w') as fil:
with open(filename_rst, "w") as fil:
txt = "```{eval-rst}\n" + txt + "\n```"
fil.write(txt)
# rename .rst file to .md file
filename, _ = filename_rst.rsplit('.', 1)
filename, _ = filename_rst.rsplit(".", 1)
filename_md = filename + ".md"
rename(filename_rst, filename_md)