From c8d9fb183f5ca704d24ecb6c7007f414d84656db Mon Sep 17 00:00:00 2001 From: Max Rozentsveyg Date: Mon, 18 May 2020 17:34:38 -0400 Subject: [PATCH] Fix C407 --- pre_commit_hooks/file_contents_sorter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_commit_hooks/file_contents_sorter.py b/pre_commit_hooks/file_contents_sorter.py index 41ce306..983ba01 100644 --- a/pre_commit_hooks/file_contents_sorter.py +++ b/pre_commit_hooks/file_contents_sorter.py @@ -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'