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

Skip to content

Commit 7d7c9c0

Browse files
committed
Additional fixes prompted by double-quote-string-fixer.
Signed-off-by: Brett Randall <[email protected]>
1 parent f5af95c commit 7d7c9c0

4 files changed

Lines changed: 19 additions & 19 deletions

File tree

pre_commit/color_windows.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ def bool_errcheck(result, func, args):
2020

2121

2222
GetStdHandle = WINFUNCTYPE(HANDLE, DWORD)(
23-
("GetStdHandle", windll.kernel32), ((1, "nStdHandle"),),
23+
('GetStdHandle', windll.kernel32), ((1, 'nStdHandle'),),
2424
)
2525

2626
GetConsoleMode = WINFUNCTYPE(BOOL, HANDLE, POINTER(DWORD))(
27-
("GetConsoleMode", windll.kernel32),
28-
((1, "hConsoleHandle"), (2, "lpMode")),
27+
('GetConsoleMode', windll.kernel32),
28+
((1, 'hConsoleHandle'), (2, 'lpMode')),
2929
)
3030
GetConsoleMode.errcheck = bool_errcheck
3131

3232
SetConsoleMode = WINFUNCTYPE(BOOL, HANDLE, DWORD)(
33-
("SetConsoleMode", windll.kernel32),
34-
((1, "hConsoleHandle"), (1, "dwMode")),
33+
('SetConsoleMode', windll.kernel32),
34+
((1, 'hConsoleHandle'), (1, 'dwMode')),
3535
)
3636
SetConsoleMode.errcheck = bool_errcheck
3737

tests/meta_hooks/check_useless_excludes_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_useless_exclude_for_hook(capsys, in_git_dir):
4040
out = out.strip()
4141
expected = (
4242
"The exclude pattern 'foo' for check-useless-excludes "
43-
"does not match any files"
43+
'does not match any files'
4444
)
4545
assert expected == out
4646

@@ -69,7 +69,7 @@ def test_useless_exclude_with_types_filter(capsys, in_git_dir):
6969
out = out.strip()
7070
expected = (
7171
"The exclude pattern '.pre-commit-config.yaml' for "
72-
"check-useless-excludes does not match any files"
72+
'check-useless-excludes does not match any files'
7373
)
7474
assert expected == out
7575

tests/repository_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def test_local_golang_additional_dependencies(store):
528528
}
529529
ret = _get_hook(config, store, 'hello').run(())
530530
assert ret[0] == 0
531-
assert _norm_out(ret[1]) == b"Hello, Go examples!\n"
531+
assert _norm_out(ret[1]) == b'Hello, Go examples!\n'
532532

533533

534534
def test_local_rust_additional_dependencies(store):
@@ -544,7 +544,7 @@ def test_local_rust_additional_dependencies(store):
544544
}
545545
ret = _get_hook(config, store, 'hello').run(())
546546
assert ret[0] == 0
547-
assert _norm_out(ret[1]) == b"Hello World!\n"
547+
assert _norm_out(ret[1]) == b'Hello World!\n'
548548

549549

550550
def test_fail_hooks(store):

tests/util_test.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ def test_CalledProcessError_str():
1717
)
1818
assert str(error) == (
1919
"Command: ['git', 'status']\n"
20-
"Return code: 1\n"
21-
"Expected return code: 0\n"
22-
"Output: \n"
23-
" stdout\n"
24-
"Errors: \n"
25-
" stderr\n"
20+
'Return code: 1\n'
21+
'Expected return code: 0\n'
22+
'Output: \n'
23+
' stdout\n'
24+
'Errors: \n'
25+
' stderr\n'
2626
)
2727

2828

@@ -32,10 +32,10 @@ def test_CalledProcessError_str_nooutput():
3232
)
3333
assert str(error) == (
3434
"Command: ['git', 'status']\n"
35-
"Return code: 1\n"
36-
"Expected return code: 0\n"
37-
"Output: (none)\n"
38-
"Errors: (none)\n"
35+
'Return code: 1\n'
36+
'Expected return code: 0\n'
37+
'Output: (none)\n'
38+
'Errors: (none)\n'
3939
)
4040

4141

0 commit comments

Comments
 (0)