Increase number of lines for tunnel info logs#1404
Conversation
📝 WalkthroughWalkthroughUpdated default Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
api/transformerlab/routers/experiment/jobs.py (1)
363-370: LGTM – but add a return type annotation per coding guidelines.The default/bounds update is correct. The function signature lacks a return type annotation, which is mandatory for
api/**/*.py.♻️ Proposed fix
-async def get_tunnel_info_for_job( +async def get_tunnel_info_for_job( # type: ignore[return]or more correctly, annotate the actual return type:
-async def get_tunnel_info_for_job( +async def get_tunnel_info_for_job( # noqaA concrete diff (the return type mirrors the response dict structure):
async def get_tunnel_info_for_job( experimentId: str, job_id: str, tail_lines: int = Query(1000, ge=100, le=5000), user_and_team=Depends(get_user_and_team), session: AsyncSession = Depends(get_async_session), -): +) -> dict:As per coding guidelines: "Mandatory type hints for all Python function arguments and return types."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api/transformerlab/routers/experiment/jobs.py` around lines 363 - 370, Add a return type annotation to the get_tunnel_info_for_job function signature (currently defined as async def get_tunnel_info_for_job(...)) to satisfy mandatory type hints; update it to something like -> Dict[str, Any] or the more precise dict[str, Any] that matches the response dict structure returned by this endpoint, and add the necessary import(s) (from typing import Dict, Any) at the top of the file if not present; ensure the annotation appears on the function that includes parameters experimentId, job_id, tail_lines and dependencies (get_user_and_team, get_async_session).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@api/transformerlab/routers/experiment/jobs.py`:
- Around line 363-370: Add a return type annotation to the
get_tunnel_info_for_job function signature (currently defined as async def
get_tunnel_info_for_job(...)) to satisfy mandatory type hints; update it to
something like -> Dict[str, Any] or the more precise dict[str, Any] that matches
the response dict structure returned by this endpoint, and add the necessary
import(s) (from typing import Dict, Any) at the top of the file if not present;
ensure the annotation appears on the function that includes parameters
experimentId, job_id, tail_lines and dependencies (get_user_and_team,
get_async_session).
Summary by CodeRabbit