Skip to content

Commit

Permalink
run darker
Browse files Browse the repository at this point in the history
  • Loading branch information
rushabh-v committed Sep 12, 2020
1 parent ac99f87 commit 50a8bd8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tools/fixup_whats_new_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
from pathlib import Path

def main():
folder = Path('docs/source/whatsnew/pr/')
files = list(folder.glob('*.rst'))
folder = Path("docs/source/whatsnew/pr/")
files = list(folder.glob("*.rst"))
print(files)

for filepath in files:
print('Adding pseudo-title to:', filepath.name)
title = filepath.name[:-4].split('/')[-1].replace('-', ' ').capitalize()
print("Adding pseudo-title to:", filepath.name)
title = filepath.name[:-4].split("/")[-1].replace("-", " ").capitalize()

data = filepath.read_text()
try:
Expand All @@ -29,9 +29,9 @@ def main():
except IndexError:
pass

with filepath.open('w') as f:
f.write(title+'\n')
f.write('='* len(title)+'\n\n')
with filepath.open("w") as f:
f.write(title + "\n")
f.write("=" * len(title) + "\n\n")
f.write(data)

if __name__ == '__main__':
Expand Down

0 comments on commit 50a8bd8

Please sign in to comment.