Skip to content

Commit 6850fbb

Browse files
mjunaidcaclaude
andcommitted
fix(lint): resolve ruff line-length and unused variable errors
- Shorten description strings in Task model fields (E501) - Shorten comment for self-referential relationship (E501) - Remove unused new_task variable assignment (F841) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent db37326 commit 6850fbb

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

packages/api/src/taskflow_api/models/task.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Task(SQLModel, table=True):
6767
)
6868
recurrence_pattern: str | None = Field(
6969
default=None,
70-
description="Interval pattern: '1m', '5m', '10m', '15m', '30m', '1h', 'daily', 'weekly', 'monthly'",
70+
description="Interval: 1m, 5m, 10m, 15m, 30m, 1h, daily, weekly, monthly",
7171
)
7272
max_occurrences: int | None = Field(
7373
default=None,
@@ -88,7 +88,7 @@ class Task(SQLModel, table=True):
8888
)
8989
has_spawned_next: bool = Field(
9090
default=False,
91-
description="Whether this task has already spawned its next occurrence (prevents duplicates)",
91+
description="Whether this task has already spawned its next occurrence",
9292
)
9393

9494
# Foreign keys
@@ -125,7 +125,7 @@ class Task(SQLModel, table=True):
125125
sa_relationship_kwargs={"foreign_keys": "[Task.created_by_id]"},
126126
)
127127

128-
# Self-referential for subtasks (explicit foreign_keys needed due to recurring_root_id also being self-ref)
128+
# Self-referential for subtasks (foreign_keys needed for recurring_root_id)
129129
parent: "Task" = Relationship(
130130
back_populates="subtasks",
131131
sa_relationship_kwargs={

packages/api/src/taskflow_api/routers/tasks.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,11 +1135,8 @@ async def approve_task(
11351135
)
11361136

11371137
# Handle recurring task - create next occurrence
1138-
new_task = None
11391138
if task.is_recurring and task.recurrence_pattern:
1140-
new_task = await create_next_occurrence(
1141-
session, task, worker_id, worker_type
1142-
)
1139+
await create_next_occurrence(session, task, worker_id, worker_type)
11431140

11441141
await session.commit()
11451142
await session.refresh(task)

0 commit comments

Comments
 (0)