Skip to content

Commit 060e875

Browse files
author
popagruia
committed
Fix flake 8 issues
Signed-off-by: popagruia <[email protected]>
1 parent 8458bf5 commit 060e875

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

plugins/vault/vault_plugin.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ async def tool_pre_invoke(self, payload: ToolPreInvokePayload, context: PluginCo
126126

127127
system_key: str | None = None
128128
auth_header: str | None = None
129-
130129
if self._sconfig.system_handling == SystemHandling.TAG:
131130
# Extract tags from dict format {"id": "...", "label": "..."}
132131
normalized_tags: list[str] = []
@@ -138,14 +137,12 @@ async def tool_pre_invoke(self, payload: ToolPreInvokePayload, context: PluginCo
138137
normalized_tags.append(tag_value)
139138
elif hasattr(tag, "label"):
140139
normalized_tags.append(str(getattr(tag, "label")))
141-
142140
# Find system tag with the configured prefix
143141
system_prefix = self._sconfig.system_tag_prefix + ":"
144142
system_tag = next((tag for tag in normalized_tags if tag.startswith(system_prefix)), None)
145143
if system_tag:
146144
system_key = system_tag.split(system_prefix)[1]
147145
logger.info(f"Using vault system from GW tags: {system_key}")
148-
149146
# Find auth header tag with the configured prefix (e.g., "AUTH_HEADER:X-GitHub-Token")
150147
auth_header_prefix = self._sconfig.auth_header_tag_prefix + ":"
151148
auth_header_tag = next((tag for tag in normalized_tags if tag.startswith(auth_header_prefix)), None)
@@ -194,7 +191,6 @@ async def tool_pre_invoke(self, payload: ToolPreInvokePayload, context: PluginCo
194191
# First try exact match with system_key
195192
token_value: str | None = None
196193
token_key_used: str | None = None
197-
198194
if system_key in vault_tokens:
199195
token_value = str(vault_tokens[system_key])
200196
token_key_used = str(system_key)
@@ -212,12 +208,10 @@ async def tool_pre_invoke(self, payload: ToolPreInvokePayload, context: PluginCo
212208
if token_value and token_key_used:
213209
# Parse the token key to determine handling
214210
parsed_system, scope, token_type, token_name = self._parse_vault_token_key(token_key_used)
215-
216211
# Determine how to handle the token based on token_type and AUTH_HEADER tag
217212
if token_type == "PAT":
218213
# Handle Personal Access Token
219214
logger.info(f"Processing PAT token for system: {parsed_system}")
220-
221215
# Check if AUTH_HEADER tag is defined
222216
if auth_header:
223217
logger.info(f"Using AUTH_HEADER tag for {parsed_system}: header={auth_header}")

0 commit comments

Comments
 (0)