From 6e3e7b9ca0548430aaa5e2555d6e02c64625fa3f Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Mon, 2 Nov 2020 12:50:00 +0100 Subject: replace **locals by f-strings where possible This change affects mostly only my own sources which were prepared for the migration to Python 3.6 . Task-number: PYSIDE-904 Change-Id: I0c2cd59f6f625f51f876099c33005ac70ca39db9 Reviewed-by: Cristian Maureira-Fredes --- sources/pyside2/tests/registry/existence_test.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sources/pyside2/tests/registry/existence_test.py') diff --git a/sources/pyside2/tests/registry/existence_test.py b/sources/pyside2/tests/registry/existence_test.py index b8a42058d..c8185b140 100644 --- a/sources/pyside2/tests/registry/existence_test.py +++ b/sources/pyside2/tests/registry/existence_test.py @@ -115,8 +115,7 @@ except NameError as e: have_refmodule = False dict_name = "sig_dict" if have_refmodule and not hasattr(sig_exists, dict_name): - print("*** wrong module without '{dict_name}', removed:" - .format(**locals()), shortpath) + print(f"*** wrong module without '{dict_name}', removed: {shortpath}") os.unlink(effectiveRefPath) have_refmodule = False @@ -137,9 +136,8 @@ class TestSignaturesExists(unittest.TestCase): def multi_signature_msg(key, actual, expect): len_act = len(actual) if type(actual) is list else 1 len_exp = len(expect) if type(expect) is list else 1 - return ("multi-signature count mismatch for '{key}'. " - "Actual {len_act} {actual} vs. expected {len_exp} {expect}')" - .format(**locals())) + return (f"multi-signature count mismatch for '{key}'. " + f"Actual {len_act} {actual} vs. expected {len_exp} {expect}") for key, value in sig_exists.sig_dict.items(): name = key.rsplit(".", 1)[-1] -- cgit v1.2.3