From 39e39e80f1c4ed23715bcf70cd0b3d9884907dbb Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 10 Nov 2025 19:39:36 +0000 Subject: [PATCH] Fix flake8 F824 errors - remove unused global declarations Remove unnecessary global declarations for MODEL_CLIENT_MAP that are never reassigned --- app.py | 2 +- research/guarded_ai.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app.py b/app.py index c083bcc..a4944f4 100644 --- a/app.py +++ b/app.py @@ -88,7 +88,7 @@ def get_client_for_endpoint(endpoint, api_key): def initialize_model_map(): - global MODEL_CLIENT_MAP, SYSTEM_USERS + global SYSTEM_USERS MODEL_CLIENT_MAP.clear() for ep_config in ENDPOINTS: base_url = ep_config["base_url"] diff --git a/research/guarded_ai.py b/research/guarded_ai.py index a61a913..b0526ad 100644 --- a/research/guarded_ai.py +++ b/research/guarded_ai.py @@ -31,8 +31,6 @@ def get_client_for_endpoint(endpoint, api_key): def initialize_model_map(): """Initialize the model-client mapping from environment variables""" - global MODEL_CLIENT_MAP - # Load endpoints from environment variables for i in range(1000): # Support up to 1000 endpoints endpoint_key = f"MODEL_ENDPOINT_{i}"