Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- id: trailing-whitespace
- id: end-of-file-fixer
- id: autopep8-wrapper
args: ['-i', '--ignore=E265,E309,E501', '-v']
args: ['-i', '--ignore=E265,E309,E501']
- id: check-json
- id: check-yaml
- id: debug-statements
Expand Down
3 changes: 1 addition & 2 deletions pre_commit/output.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import unicode_literals

import os
import subprocess
import sys

Expand All @@ -11,7 +10,7 @@
# TODO: smell: import side-effects
COLS = int(
subprocess.Popen(
['tput', 'cols'], stdout=subprocess.PIPE, stderr=open(os.devnull, 'w'),
['tput', 'cols'], stdout=subprocess.PIPE,
).communicate()[0] or
# Default in the case of no terminal
80
Expand Down
5 changes: 4 additions & 1 deletion tests/commands/install_uninstall_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,10 @@ def test_installed_from_venv(tmpdir_factory):
# Should still pick up the python from when we installed
ret, output = _get_commit_output(
tmpdir_factory,
env_base={'HOME': os.environ['HOME']},
env_base={
'HOME': os.environ['HOME'],
'TERM': os.environ.get('TERM', ''),
},
)
assert ret == 0
assert NORMAL_PRE_COMMIT_RUN.match(output)