Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #5529: Print python lint errors at the end of the check #6005

Merged
merged 2 commits into from
Dec 22, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Review changes
  • Loading branch information
apb7 committed Dec 21, 2018
commit 6e3c88f714cf5fbad02cd52fab0af5140c9a6f6c
3 changes: 2 additions & 1 deletion scripts/pre_commit_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ def _get_all_files_in_directory(dir_path, excluded_glob_patterns):

@contextlib.contextmanager
def _redirect_stdout(new_target):
old_target, sys.stdout = sys.stdout, new_target
old_target = sys.stdout
sys.stdout = new_target
try:
yield new_target
finally:
Expand Down