mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
ae66312d8c
* Add Python linter to github actions * wip * Add back splat_ext * Format files * C++ -> C * format 2 files * split workflow into separate file, line length 120, fix excludes * -l 120 in ci * update black locally and apply formatting changes * pyproject.toject --------- Co-authored-by: Ethan Roseman <ethteck@gmail.com>
16 lines
340 B
Python
16 lines
340 B
Python
from pathlib import Path
|
|
|
|
|
|
def parse_folder(path):
|
|
for entry in path.iterdir():
|
|
if entry.is_dir():
|
|
parse_folder(entry)
|
|
else:
|
|
fd = entry.read_text().splitlines()
|
|
if fd[-1] != "":
|
|
fd.append("")
|
|
entry.write_text("\n".join(fd))
|
|
|
|
|
|
parse_folder(Path("src"))
|