From 9567db66e5a1d16b4c8055832710fbabee8431f8 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Wed, 18 Oct 2017 14:46:38 -0700 Subject: [PATCH] Add a flush --- pre_commit_hooks/check_vcs_permalinks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pre_commit_hooks/check_vcs_permalinks.py b/pre_commit_hooks/check_vcs_permalinks.py index 130abf6..d67d5f5 100644 --- a/pre_commit_hooks/check_vcs_permalinks.py +++ b/pre_commit_hooks/check_vcs_permalinks.py @@ -18,6 +18,7 @@ def _check_filename(filename): for i, line in enumerate(f, 1): if GITHUB_NON_PERMALINK.search(line): sys.stdout.write('{}:{}:'.format(filename, i)) + sys.stdout.flush() getattr(sys.stdout, 'buffer', sys.stdout).write(line) retv = 1 return retv