Skip to content

Commit 6f68788

Browse files
author
Zvi Fried
committed
fix: resolve CI failures - import sorting and bandit security issues
- Fixed import sorting issue in llm_client.py detected by ruff - Added nosec B110 comments to intentional try-except-pass blocks - Enhanced LiteLLM configuration with set_verbose=False for cleaner output - All CI checks now passing: ruff, mypy, bandit, and 173 tests
1 parent 0bd7138 commit 6f68788

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@ addopts = [
143143
"--strict-config",
144144
"--verbose",
145145
]
146-
# No filterwarnings - we want to catch any remaining Pydantic issues
147-
# filterwarnings = []
148146
markers = [
149147
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
150148
"integration: marks tests as integration tests",

src/mcp_as_a_judge/llm/llm_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
from mcp_as_a_judge.core.logging_config import get_logger
2121
from mcp_as_a_judge.llm.llm_integration import LLMConfig, LLMVendor
2222

23-
23+
# Configure LiteLLM to handle parameter restrictions and suppress warnings
2424
litellm.drop_params = True
2525
litellm.suppress_debug_info = True
26+
# Suppress Pydantic serialization warnings from LiteLLM
27+
litellm.set_verbose = False
2628

2729
# Set up logger
2830
logger = get_logger(__name__)

src/mcp_as_a_judge/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ async def _validate_research_quality(
11671167
],
11681168
"feedback": descriptive_feedback,
11691169
}
1170-
except Exception:
1170+
except Exception: # nosec B110
11711171
# Be resilient; failing aspects extraction should not crash validation
11721172
pass
11731173

@@ -1603,7 +1603,7 @@ async def judge_coding_plan(
16031603
missing_deliverables.append("Add a clear Problem Domain Statement with explicit non-goals")
16041604
if not getattr(updated_task_metadata, "library_plan", []) or len(getattr(updated_task_metadata, "library_plan", [])) == 0:
16051605
missing_deliverables.append("Provide a Library Selection Map (purpose → internal/external library with justification)")
1606-
except Exception:
1606+
except Exception: # nosec B110
16071607
pass
16081608

16091609
effective_approved = evaluation_result.approved and not missing_deliverables

src/mcp_as_a_judge/tasks/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ async def load_task_metadata_from_history(
220220
# If plan was approved, set PLAN_APPROVED
221221
elif latest_snapshot.get("plan_approved_at"):
222222
latest_snapshot["state"] = TaskState.PLAN_APPROVED.value
223-
except Exception:
223+
except Exception: # nosec B110
224224
# Best-effort inference only
225225
pass
226226

src/mcp_as_a_judge/tasks/research.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ResearchAspectsUserVars(BaseModel):
5252
# Use globals() to avoid mypy type assignment errors
5353
globals()["ResearchAspectsExtraction"] = _models_py.ResearchAspectsExtraction
5454
globals()["ResearchAspectsUserVars"] = _models_py.ResearchAspectsUserVars
55-
except Exception:
55+
except Exception: # nosec B110
5656
# Use the fallback classes defined above
5757
pass
5858

0 commit comments

Comments
 (0)