From e9755fae783bfce12ed05928d5d93e2e510ac1a5 Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Mon, 1 Jul 2024 14:56:51 -0400 Subject: [PATCH] [2270] C420 Unnecessary Dict Comprehension --- debug_webserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debug_webserver.py b/debug_webserver.py index 87f7eaed0..1825c7717 100644 --- a/debug_webserver.py +++ b/debug_webserver.py @@ -18,7 +18,7 @@ output_lock = threading.Lock() output_data_path = pathlib.Path(tempfile.gettempdir()) / f'{appname}' / 'http_debug' -SAFE_TRANSLATE = str.maketrans({x: '_' for x in "!@#$%^&*()./\\\r\n[]-+='\";:?<>,~`"}) +SAFE_TRANSLATE = str.maketrans(dict.fromkeys("!@#$%^&*()./\\\r\n[]-+='\";:?<>,~`", '_')) class LoggingHandler(server.BaseHTTPRequestHandler):