mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-29 10:16:52 +00:00
Fix C407
This commit is contained in:
parent
3d379a962d
commit
c8d9fb183f
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ FAIL = 1
|
|||
|
||||
def sort_file_contents(f: IO[bytes]) -> int:
|
||||
before = list(f)
|
||||
after = sorted([line.strip(b'\n\r') for line in before if line.strip()])
|
||||
after = sorted(line.strip(b'\n\r') for line in before if line.strip())
|
||||
|
||||
before_string = b''.join(before)
|
||||
after_string = b'\n'.join(after) + b'\n'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue