Fix blank lines · TomsCodingCode/pre-commit-hooks@fdbaeb8 · GitHub
Skip to content

Commit fdbaeb8

Browse files
committed
Fix blank lines
As stated in the documentation: `Note that this hook WILL remove blank lines` Previously this hook would always add blank a blank line. With this fix, if the file is empty, a newline will not be added, and multpline blanklines in a file will be removed. Fixes pre-commit#935
1 parent 1790c6b commit fdbaeb8

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

pre_commit_hooks/file_contents_sorter.py

Lines changed: 4 additions & 1 deletion

tests/file_contents_sorter_test.py

Lines changed: 3 additions & 1 deletion

0 commit comments

Comments
 (0)