Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3793bc3

Browse files
committed
Fix linters
1 parent 2d57068 commit 3793bc3

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

pre_commit/languages/pygrep.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,18 @@ def _process_filename_by_line(pattern, filename):
2626
output.write_line(line.rstrip(b'\r\n'))
2727
return retv
2828

29+
2930
def _process_filename_at_once(pattern, filename):
3031
retv = 0
3132
with open(filename, 'rb') as f:
32-
match = pattern.search(f.read().decode('utf-8').replace('\n',''))
33+
match = pattern.search(f.read().decode('utf-8').replace('\n', ''))
3334
if match:
3435
retv = 1
3536
output.write('{}:'.format(filename))
3637
output.write_line(match.group())
3738
return retv
3839

40+
3941
def run_hook(prefix, hook, file_args):
4042
exe = (sys.executable, '-m', __name__)
4143
exe += tuple(hook['args']) + (hook['entry'],)

tests/languages/pygrep_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def test_ignore_case(some_files, cap_out):
3939
assert ret == 1
4040
assert out == 'f2:1:[INFO] hi\n'
4141

42+
4243
def test_null_data(some_files, cap_out):
4344
ret = pygrep.main(('--null-data', r'foo.*bar', 'f1', 'f2', 'f3'))
4445
out = cap_out.get()

0 commit comments

Comments
 (0)