1414 format_output ,
1515 format_success ,
1616)
17+ from todopro_cli .ui .textual_prompt import get_interactive_input
1718from todopro_cli .utils .task_helpers import resolve_task_id
1819from todopro_cli .utils .typer_helpers import SuggestingGroup
1920
@@ -82,7 +83,10 @@ async def do_list() -> None:
8283 filtered_tasks = [
8384 task
8485 for task in tasks_list
85- if not any (task .get ("id" , "" ).endswith (short_id ) for short_id in completing_tasks )
86+ if not any (
87+ task .get ("id" , "" ).endswith (short_id )
88+ for short_id in completing_tasks
89+ )
8690 ]
8791 if len (filtered_tasks ) < original_count :
8892 if "tasks" in result :
@@ -448,7 +452,9 @@ async def do_reopen() -> None:
448452@app .command ("today" )
449453def today (
450454 output : str = typer .Option ("pretty" , "--output" , "-o" , help = "Output format" ),
451- json : bool = typer .Option (False , "--json" , help = "Output as JSON (alias for --output json)" ),
455+ json : bool = typer .Option (
456+ False , "--json" , help = "Output as JSON (alias for --output json)"
457+ ),
452458 compact : bool = typer .Option (False , "--compact" , help = "Compact output" ),
453459 profile : str = typer .Option ("default" , "--profile" , help = "Profile name" ),
454460) -> None :
@@ -513,7 +519,10 @@ async def do_today() -> None:
513519 all_tasks = [
514520 task
515521 for task in all_tasks
516- if not any (task .get ("id" , "" ).endswith (short_id ) for short_id in completing_tasks )
522+ if not any (
523+ task .get ("id" , "" ).endswith (short_id )
524+ for short_id in completing_tasks
525+ )
517526 ]
518527 filtered_count = original_count - len (all_tasks )
519528
@@ -538,14 +547,21 @@ async def do_today() -> None:
538547 # Handle empty result based on output format
539548 if output == "json" :
540549 import json
541- print (json .dumps ({
542- "tasks" : [],
543- "overdue_count" : 0 ,
544- "today_count" : 0 ,
545- "message" : "No tasks due today"
546- }))
550+
551+ print (
552+ json .dumps (
553+ {
554+ "tasks" : [],
555+ "overdue_count" : 0 ,
556+ "today_count" : 0 ,
557+ "message" : "No tasks due today" ,
558+ }
559+ )
560+ )
547561 elif output == "yaml" :
548- print ("tasks: []\n overdue_count: 0\n today_count: 0\n message: No tasks due today" )
562+ print (
563+ "tasks: []\n overdue_count: 0\n today_count: 0\n message: No tasks due today"
564+ )
549565 else :
550566 console .print ("[green]No tasks due today! 🎉[/green]" )
551567
@@ -562,7 +578,9 @@ async def do_today() -> None:
562578@app .command ("next" )
563579def next_task (
564580 output : str = typer .Option ("table" , "--output" , "-o" , help = "Output format" ),
565- json : bool = typer .Option (False , "--json" , help = "Output as JSON (alias for --output json)" ),
581+ json : bool = typer .Option (
582+ False , "--json" , help = "Output as JSON (alias for --output json)"
583+ ),
566584 profile : str = typer .Option ("default" , "--profile" , help = "Profile name" ),
567585) -> None :
568586 """Show the next task to do right now."""
@@ -585,10 +603,8 @@ async def do_next() -> None:
585603 # No tasks found
586604 if output == "json" :
587605 import json
588- print (json .dumps ({
589- "task" : None ,
590- "message" : result ["message" ]
591- }))
606+
607+ print (json .dumps ({"task" : None , "message" : result ["message" ]}))
592608 elif output == "yaml" :
593609 print (f"task: null\n message: { result ['message' ]} " )
594610 else :
@@ -600,6 +616,7 @@ async def do_next() -> None:
600616 else :
601617 # Custom simple format for next task
602618 from todopro_cli .ui .formatters import format_next_task
619+
603620 format_next_task (result )
604621
605622 finally :
@@ -745,8 +762,6 @@ def quick_add(
745762 # If no text provided, use interactive prompt
746763 if not text :
747764 try :
748- from todopro_cli .ui .interactive_prompt import get_interactive_input
749-
750765 text = asyncio .run (get_interactive_input (profile = profile ))
751766 except KeyboardInterrupt :
752767 console .print ("\n [yellow]Cancelled.[/yellow]" )
@@ -809,9 +824,7 @@ async def do_quick_add():
809824 due = datetime .fromisoformat (
810825 parsed ["due_date" ].replace ("Z" , "+00:00" )
811826 )
812- details .append (
813- f"📅 { due .strftime ('%b %d, %Y at %I:%M %p' )} "
814- )
827+ details .append (f"📅 { due .strftime ('%b %d, %Y at %I:%M %p' )} " )
815828
816829 if parsed .get ("project_name" ):
817830 details .append (f"[magenta]📁 #{ parsed ['project_name' ]} [/magenta]" )
0 commit comments