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) <noreply@anthropic.com>
This commit is contained in:
Tanmoy Sarkar 2026-06-12 23:53:07 +05:30
parent 1d9b64c9bc
commit 78014d0cc4

View File

@ -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_")}