mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 20:40:08 -06:00
Additional fixes prompted by double-quote-string-fixer.
Signed-off-by: Brett Randall <javabrett@gmail.com>
This commit is contained in:
@@ -20,18 +20,18 @@ def bool_errcheck(result, func, args):
|
||||
|
||||
|
||||
GetStdHandle = WINFUNCTYPE(HANDLE, DWORD)(
|
||||
("GetStdHandle", windll.kernel32), ((1, "nStdHandle"),),
|
||||
('GetStdHandle', windll.kernel32), ((1, 'nStdHandle'),),
|
||||
)
|
||||
|
||||
GetConsoleMode = WINFUNCTYPE(BOOL, HANDLE, POINTER(DWORD))(
|
||||
("GetConsoleMode", windll.kernel32),
|
||||
((1, "hConsoleHandle"), (2, "lpMode")),
|
||||
('GetConsoleMode', windll.kernel32),
|
||||
((1, 'hConsoleHandle'), (2, 'lpMode')),
|
||||
)
|
||||
GetConsoleMode.errcheck = bool_errcheck
|
||||
|
||||
SetConsoleMode = WINFUNCTYPE(BOOL, HANDLE, DWORD)(
|
||||
("SetConsoleMode", windll.kernel32),
|
||||
((1, "hConsoleHandle"), (1, "dwMode")),
|
||||
('SetConsoleMode', windll.kernel32),
|
||||
((1, 'hConsoleHandle'), (1, 'dwMode')),
|
||||
)
|
||||
SetConsoleMode.errcheck = bool_errcheck
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ def test_useless_exclude_for_hook(capsys, in_git_dir):
|
||||
out = out.strip()
|
||||
expected = (
|
||||
"The exclude pattern 'foo' for check-useless-excludes "
|
||||
"does not match any files"
|
||||
'does not match any files'
|
||||
)
|
||||
assert expected == out
|
||||
|
||||
@@ -69,7 +69,7 @@ def test_useless_exclude_with_types_filter(capsys, in_git_dir):
|
||||
out = out.strip()
|
||||
expected = (
|
||||
"The exclude pattern '.pre-commit-config.yaml' for "
|
||||
"check-useless-excludes does not match any files"
|
||||
'check-useless-excludes does not match any files'
|
||||
)
|
||||
assert expected == out
|
||||
|
||||
|
||||
@@ -528,7 +528,7 @@ def test_local_golang_additional_dependencies(store):
|
||||
}
|
||||
ret = _get_hook(config, store, 'hello').run(())
|
||||
assert ret[0] == 0
|
||||
assert _norm_out(ret[1]) == b"Hello, Go examples!\n"
|
||||
assert _norm_out(ret[1]) == b'Hello, Go examples!\n'
|
||||
|
||||
|
||||
def test_local_rust_additional_dependencies(store):
|
||||
@@ -544,7 +544,7 @@ def test_local_rust_additional_dependencies(store):
|
||||
}
|
||||
ret = _get_hook(config, store, 'hello').run(())
|
||||
assert ret[0] == 0
|
||||
assert _norm_out(ret[1]) == b"Hello World!\n"
|
||||
assert _norm_out(ret[1]) == b'Hello World!\n'
|
||||
|
||||
|
||||
def test_fail_hooks(store):
|
||||
|
||||
@@ -17,12 +17,12 @@ def test_CalledProcessError_str():
|
||||
)
|
||||
assert str(error) == (
|
||||
"Command: ['git', 'status']\n"
|
||||
"Return code: 1\n"
|
||||
"Expected return code: 0\n"
|
||||
"Output: \n"
|
||||
" stdout\n"
|
||||
"Errors: \n"
|
||||
" stderr\n"
|
||||
'Return code: 1\n'
|
||||
'Expected return code: 0\n'
|
||||
'Output: \n'
|
||||
' stdout\n'
|
||||
'Errors: \n'
|
||||
' stderr\n'
|
||||
)
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@ def test_CalledProcessError_str_nooutput():
|
||||
)
|
||||
assert str(error) == (
|
||||
"Command: ['git', 'status']\n"
|
||||
"Return code: 1\n"
|
||||
"Expected return code: 0\n"
|
||||
"Output: (none)\n"
|
||||
"Errors: (none)\n"
|
||||
'Return code: 1\n'
|
||||
'Expected return code: 0\n'
|
||||
'Output: (none)\n'
|
||||
'Errors: (none)\n'
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user