Run black on all Python scripts!
This commit is contained in:
parent
fb6cfce656
commit
cd9cbcaa28
30 changed files with 1027 additions and 704 deletions
|
@ -16,17 +16,17 @@ def main() -> None:
|
|||
"""
|
||||
Function that executes the script.
|
||||
"""
|
||||
for root, _, files in os.walk('.'):
|
||||
for root, _, files in os.walk("."):
|
||||
for filename in files:
|
||||
match = re.match(r'^(\d+) - (.+)$', filename)
|
||||
match = re.match(r"^(\d+) - (.+)$", filename)
|
||||
if not match:
|
||||
continue
|
||||
new_filename = f"{match[1]} {match[2]}"
|
||||
old_path = os.path.join(root, filename)
|
||||
new_path = os.path.join(root, new_filename)
|
||||
print(old_path, '->', new_path)
|
||||
print(old_path, "->", new_path)
|
||||
os.rename(old_path, new_path)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue