Enforce consistent string quoting style
This commit is contained in:
parent
36c29627af
commit
7de587148e
@ -81,7 +81,7 @@ REFERENCE_ICONS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("reference", REFERENCE_ICONS)
|
@pytest.mark.parametrize('reference', REFERENCE_ICONS)
|
||||||
def test_identicon(reference):
|
def test_identicon(reference):
|
||||||
icon = Identicon(reference.fingerprint)
|
icon = Identicon(reference.fingerprint)
|
||||||
icon.calculate()
|
icon.calculate()
|
||||||
|
6
main.py
6
main.py
@ -42,9 +42,9 @@ def main(**kwargs):
|
|||||||
|
|
||||||
def get_input_stream(kwargs):
|
def get_input_stream(kwargs):
|
||||||
stream = None
|
stream = None
|
||||||
if (text := kwargs["text"]) is not None:
|
if (text := kwargs['text']) is not None:
|
||||||
stream = ClosableStream(BytesIO(text.encode()))
|
stream = ClosableStream(BytesIO(text.encode()))
|
||||||
elif file := kwargs["file"]:
|
elif file := kwargs['file']:
|
||||||
stream = get_deterministic_stream(file)
|
stream = get_deterministic_stream(file)
|
||||||
elif not stdin.isatty():
|
elif not stdin.isatty():
|
||||||
stream = ClosableStream(stdin.buffer)
|
stream = ClosableStream(stdin.buffer)
|
||||||
@ -83,7 +83,7 @@ def get_deterministic_tar_stream(file):
|
|||||||
def wait_and_check_exitcode():
|
def wait_and_check_exitcode():
|
||||||
exit_code = p.wait()
|
exit_code = p.wait()
|
||||||
if exit_code != 0:
|
if exit_code != 0:
|
||||||
raise RuntimeError(f"Tar failed: {p.stderr.read().decode()}")
|
raise RuntimeError(f'Tar failed: {p.stderr.read().decode()}')
|
||||||
|
|
||||||
return ClosableStream(p.stdout, wait_and_check_exitcode)
|
return ClosableStream(p.stdout, wait_and_check_exitcode)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user