@@ -122,7 +122,8 @@ def add_task(
122122 # Validate creator exists
123123 if storage .get_worker (creator ) is None :
124124 console .print (
125- f"[red]Error: Creator '{ creator } ' not found. Add worker first with 'taskflow worker add'[/red]"
125+ f"[red]Error: Creator '{ creator } ' not found. "
126+ "Add worker first with 'taskflow worker add'[/red]"
126127 )
127128 raise typer .Exit (1 )
128129
@@ -154,9 +155,8 @@ def add_task(
154155 # Validate priority
155156 valid_priorities = ["low" , "medium" , "high" , "critical" ]
156157 if priority not in valid_priorities :
157- console .print (
158- f"[red]Error: Invalid priority '{ priority } '. Must be one of: { ', ' .join (valid_priorities )} [/red]"
159- )
158+ opts = ", " .join (valid_priorities )
159+ console .print (f"[red]Error: Invalid priority '{ priority } '. Must be one of: { opts } [/red]" )
160160 raise typer .Exit (1 )
161161
162162 # Parse due date
@@ -267,7 +267,8 @@ def add_subtask(
267267 # Validate creator exists
268268 if storage .get_worker (creator ) is None :
269269 console .print (
270- f"[red]Error: Creator '{ creator } ' not found. Add worker first with 'taskflow worker add'[/red]"
270+ f"[red]Error: Creator '{ creator } ' not found. "
271+ "Add worker first with 'taskflow worker add'[/red]"
271272 )
272273 raise typer .Exit (1 )
273274
@@ -287,9 +288,8 @@ def add_subtask(
287288 # Validate priority
288289 valid_priorities = ["low" , "medium" , "high" , "critical" ]
289290 if priority not in valid_priorities :
290- console .print (
291- f"[red]Error: Invalid priority '{ priority } '. Must be one of: { ', ' .join (valid_priorities )} [/red]"
292- )
291+ opts = ", " .join (valid_priorities )
292+ console .print (f"[red]Error: Invalid priority '{ priority } '. Must be one of: { opts } [/red]" )
293293 raise typer .Exit (1 )
294294
295295 # Generate task ID
@@ -334,7 +334,7 @@ def add_subtask(
334334
335335 # Show success message
336336 console .print (
337- f"[green]✓[/green] Subtask [bold]#{ task .id } [/bold] created successfully under parent #{ parent_id } "
337+ f"[green]✓[/green] Subtask [bold]#{ task .id } [/bold] created under parent #{ parent_id } "
338338 )
339339 console .print (f" Title: { task .title } " )
340340 console .print (f" Project: [cyan]{ task .project_slug } [/cyan] (inherited from parent)" )
@@ -394,18 +394,16 @@ def list_tasks(
394394 if priority :
395395 valid_priorities = ["low" , "medium" , "high" , "critical" ]
396396 if priority not in valid_priorities :
397- console .print (
398- f"[red]Error: Invalid priority '{ priority } '. Must be one of: { ', ' .join (valid_priorities )} [/red]"
399- )
397+ opts = ", " .join (valid_priorities )
398+ console .print (f"[red]Error: Invalid priority '{ priority } '. Options: { opts } [/red]" )
400399 raise typer .Exit (1 )
401400
402401 # Validate sort field
403402 if sort :
404403 valid_sort_fields = ["created" , "updated" , "priority" , "due_date" ]
405404 if sort not in valid_sort_fields :
406- console .print (
407- f"[red]Error: Invalid sort field '{ sort } '. Must be one of: { ', ' .join (valid_sort_fields )} [/red]"
408- )
405+ opts = ", " .join (valid_sort_fields )
406+ console .print (f"[red]Error: Invalid sort field '{ sort } '. Must be one of: { opts } [/red]" )
409407 raise typer .Exit (1 )
410408
411409 # Parse due date filters
@@ -558,17 +556,6 @@ def list_tasks(
558556 # Format assigned
559557 assigned_display = task .assigned_to if task .assigned_to else "-"
560558
561- # Format title with due date icons
562- title_display = f"TEST-{ task .title } " # TEMPORARY DEBUG
563- if task .due_date :
564- days_until_due = (task .due_date .date () - today .date ()).days
565- if days_until_due < 0 :
566- # Overdue - red circle (avoid emoji in tests, use [red] markup instead)
567- title_display = f"[red]🔴[/red] { task .title } "
568- elif days_until_due <= 2 :
569- # Due within 2 days - warning (avoid emoji in tests, use [yellow] markup instead)
570- title_display = f"[yellow]⚠️[/yellow] { task .title } "
571-
572559 # Add row directly without unpacking
573560 if has_due_dates :
574561 if task .due_date :
@@ -901,9 +888,8 @@ def edit_task(
901888 # Validate status
902889 valid_statuses = ["pending" , "in_progress" , "review" , "completed" , "blocked" ]
903890 if status not in valid_statuses :
904- console .print (
905- f"[red]Error: Invalid status '{ status } '. Must be one of: { ', ' .join (valid_statuses )} [/red]"
906- )
891+ opts = ", " .join (valid_statuses )
892+ console .print (f"[red]Error: Invalid status '{ status } '. Must be one of: { opts } [/red]" )
907893 raise typer .Exit (1 )
908894 task .status = status # type: ignore
909895 changes ["status" ] = status
@@ -912,9 +898,8 @@ def edit_task(
912898 # Validate priority
913899 valid_priorities = ["low" , "medium" , "high" , "critical" ]
914900 if priority not in valid_priorities :
915- console .print (
916- f"[red]Error: Invalid priority '{ priority } '. Must be one of: { ', ' .join (valid_priorities )} [/red]"
917- )
901+ opts = ", " .join (valid_priorities )
902+ console .print (f"[red]Error: Invalid priority '{ priority } '. Options: { opts } [/red]" )
918903 raise typer .Exit (1 )
919904 task .priority = priority # type: ignore
920905 changes ["priority" ] = priority
0 commit comments