From 78014d0cc43e6a9c8774fda7e1e59edebece07f9 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar Date: Fri, 12 Jun 2026 23:53:07 +0530 Subject: [PATCH] fix(ci): Silence pylint exec-used on companion config loader The companion config file is trusted operator input, like the main Gunicorn config, so exec'ing it is intentional. Add an inline pylint disable for W0122 to keep the lint job green. Co-Authored-By: Claude Opus 4.8 (1M context) --- gunicorn/companion/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gunicorn/companion/config.py b/gunicorn/companion/config.py index 86897929..9382919e 100644 --- a/gunicorn/companion/config.py +++ b/gunicorn/companion/config.py @@ -119,7 +119,9 @@ def _load_companion_settings(cfg): return {} namespace = {} with open(path) as config_file: - exec(compile(config_file.read(), path, "exec"), namespace) + # The companion config file is trusted operator input, like the main + # Gunicorn config; running it is the point. + exec(compile(config_file.read(), path, "exec"), namespace) # pylint: disable=exec-used return {name: value for name, value in namespace.items() if name.startswith("companion_")}