Skip to content

Commit f742f52

Browse files
committed
fix: resolve all CI lint failures
- Frontend: move ref access from render to useEffect in file-tree.tsx - Frontend: remove unused eslint-disable directive in LayoutContext.tsx - Backend: add ARG001 to global ruff ignore (slowapi requires request param) - Backend: remove f-prefix from strings without placeholders in sb_shell_tool - Backend: fix implicit Optional in billing.py, clean up unused noqa directives - Backend: add per-file-ignores for test files (print, os.path, etc.) - CI: fix Clerk publishable key format for frontend build step
1 parent e3c7ff9 commit f742f52

File tree

14 files changed

+34
-32
lines changed

14 files changed

+34
-32
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
NEXT_PUBLIC_SUPABASE_URL: "https://placeholder.supabase.co"
7676
NEXT_PUBLIC_SUPABASE_ANON_KEY: "placeholder-anon-key"
7777
NEXT_PUBLIC_BACKEND_URL: "https://placeholder.api.com"
78-
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: "pk_test_placeholder"
78+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: "pk_test_Y2xlcmsuaW52YWxpZC5jb20k"
7979
NEXT_PUBLIC_APP_URL: "http://localhost:3000"
8080
steps:
8181
- uses: actions/checkout@v4

backend/agent/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ async def get_agent_run_with_access_check(client, agent_run_id: str, user_id: st
179179
@router.post("/thread/{thread_id}/agent/start")
180180
@limiter.limit("10/minute")
181181
async def start_agent(
182-
request: Request, # noqa: ARG001 — required by slowapi limiter
182+
request: Request,
183183
thread_id: str,
184184
body: AgentStartRequest = Body(...),
185185
user_id: str = Depends(get_current_user_id_from_jwt),
@@ -1177,7 +1177,7 @@ async def generate_and_update_project_name(project_id: str, prompt: str):
11771177
@router.post("/agent/initiate", response_model=InitiateAgentResponse)
11781178
@limiter.limit("5/minute")
11791179
async def initiate_agent_with_files(
1180-
request: Request, # noqa: ARG001 — required by slowapi limiter
1180+
request: Request,
11811181
prompt: str = Form(...),
11821182
model_name: str | None = Form(None), # Default to None to use config.MODEL_TO_USE
11831183
enable_thinking: bool | None = Form(False),

backend/agent/coding_agent_prompt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from agent.base_prompt import get_base_prompt_sections
22

33

4-
def get_coding_agent_prompt(preview_url: str = "https://localhost:3000") -> str: # noqa: ARG001 — preview_url injected separately via auto-preview context in run.py
4+
def get_coding_agent_prompt(preview_url: str = "https://localhost:3000") -> str:
55
base = get_base_prompt_sections()
66
return f"""
77
<identity>

backend/agent/mobile_agent_prompt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from agent.base_prompt import get_base_prompt_sections
22

33

4-
def get_mobile_agent_prompt(preview_url: str = "https://localhost:8081") -> str: # noqa: ARG001 — preview_url injected separately via auto-preview context in run.py
4+
def get_mobile_agent_prompt(preview_url: str = "https://localhost:8081") -> str:
55
base = get_base_prompt_sections()
66
return f"""
77
<identity>

backend/agent/tools/sb_shell_tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def get_tool_schemas(self) -> dict[str, list[ToolSchema]]:
142142
XMLNodeMapping(param_name="session_name", node_type="attribute", path=".", required=True),
143143
XMLNodeMapping(param_name="kill_session", node_type="attribute", path=".", required=False),
144144
],
145-
example=f"""
145+
example="""
146146
<function_calls>
147147
<invoke name="check_command_output">
148148
<parameter name="session_name">my_session</parameter>
@@ -191,7 +191,7 @@ def get_tool_schemas(self) -> dict[str, list[ToolSchema]]:
191191
mappings=[
192192
XMLNodeMapping(param_name="session_name", node_type="attribute", path=".", required=True)
193193
],
194-
example=f"""
194+
example="""
195195
<function_calls>
196196
<invoke name="terminate_command">
197197
<parameter name="session_name">my_session</parameter>

backend/deployments/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ async def _execute_vercel_deployment(
247247
@router.post("/project/{project_id}/deploy/git")
248248
@limiter.limit("5/minute")
249249
async def deploy_to_vercel(
250-
request: Request, # noqa: ARG001 — required by slowapi limiter
250+
request: Request,
251251
project_data: tuple[dict[str, Any], str, str] = Depends(get_validated_project_with_quota_check),
252252
):
253253
"""Deploy project to Vercel via durable Inngest pipeline.
@@ -258,7 +258,7 @@ async def deploy_to_vercel(
258258
if not config.VERCEL_BEARER_TOKEN:
259259
raise HTTPException(status_code=500, detail="Vercel API not configured")
260260

261-
project, account_id, user_id = project_data # noqa: F841 — account_id kept for signature compat
261+
project, _, user_id = project_data
262262

263263
import inngest as inngest_lib
264264

backend/inngest_functions/deployments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ async def _create_vercel_deployment(project_id: str, project_name: str, files: l
193193
}
194194

195195

196-
async def _save_deployment_record(project_id: str, user_id: str, deployment: dict) -> None: # noqa: ARG001
196+
async def _save_deployment_record(project_id: str, user_id: str, deployment: dict) -> None:
197197
"""Save deployment info to Supabase projects table."""
198198
from services.supabase import DBConnection
199199

backend/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ ignore = [
9292
"S101", # assert (per-file-ignores for tests)
9393
"INP001", # implicit namespace package
9494
"TC001", "TC002", "TC003", # TYPE_CHECKING moves (breaks runtime)
95+
"ARG001", # unused function arg (slowapi @limiter requires `request: Request`)
9596

9697
# FastAPI-specific patterns
9798
"FAST002", # non-annotated dependency (FastAPI Depends() pattern)
@@ -149,6 +150,7 @@ ignore = [
149150

150151
[tool.ruff.lint.per-file-ignores]
151152
"tests/**/*.py" = ["S101", "D", "ANN", "PLR2004", "ARG001", "ARG002"]
153+
"test_*.py" = ["T201", "F401", "I001", "PTH100", "PTH113", "PTH118", "PTH120", "PTH123", "RUF010", "S101", "D", "ANN"]
152154
"agent/tools/**/*.py" = ["PLR0913", "ARG002"]
153155

154156
[tool.ruff.lint.isort]

backend/sentry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
_SENSITIVE_HEADERS = {"authorization", "cookie", "x-api-key", "x-clerk-auth-token"}
77

88

9-
def _before_send(event, hint): # noqa: ARG001 — hint required by Sentry callback signature
9+
def _before_send(event, hint):
1010
"""Scrub sensitive data before sending to Sentry."""
1111
if "request" in event:
1212
req = event["request"]

backend/services/billing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ async def get_payment_methods_for_region(country_code: str, is_subscription: boo
635635
@router.post("/payment-methods/validate")
636636
@limiter.limit("10/minute")
637637
async def validate_payment_methods_endpoint(
638-
request: Request, country_code: str = "", payment_methods: list[str] = None, is_subscription: bool = True
638+
request: Request, country_code: str = "", payment_methods: list[str] | None = None, is_subscription: bool = True
639639
):
640640
"""Validate payment methods for a specific region and transaction type."""
641641
try:

0 commit comments

Comments
 (0)