[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2022-10-06 08:23:18 +00:00
parent 405a904906
commit 213816a61f
2 changed files with 6 additions and 3 deletions

View file

@ -30,8 +30,8 @@ def fix_strings(filename: str) -> int:
if fixed != source_in_1_line:
fixed_lines = fixed.split('\n')
cell['source'] = (
[_ + '\n' for _ in fixed_lines[:-1]]
+ [fixed_lines[-1]]
[_ + '\n' for _ in fixed_lines[:-1]] +
[fixed_lines[-1]]
)
return_value = 1
@ -41,7 +41,7 @@ def fix_strings(filename: str) -> int:
json.dump(notebook_contents, f, indent=1)
# Jupyter notebooks (.ipynb) always ends with a new line
# but json.dump does not.
f.write("\n")
f.write('\n')
return return_value