Skip to content

Commit 5116dd7

Browse files
committed
[#24170] Applied Ruff
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
1 parent 48fb193 commit 5116dd7

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/vulcanai/console/console.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
import argparse
1818
import asyncio
19-
from datetime import datetime
2019
import json
2120
import sys
2221
import threading
22+
from datetime import datetime
2323
from pathlib import Path
2424
from typing import Optional
2525

@@ -39,6 +39,7 @@
3939
from vulcanai.console.widget_spinner import SpinnerStatus
4040
from vulcanai.core.plan_types import GlobalPlan
4141

42+
4243
class TextualLogSink:
4344
"""A default console that prints to standard output."""
4445

@@ -175,7 +176,7 @@ def __init__(
175176
self.suggestion_index_changed = threading.Event()
176177
# Log creation files
177178
now = datetime.now()
178-
self.execution_time = now.strftime('%Y-%m-%d-%H-%M')
179+
self.execution_time = now.strftime("%Y-%m-%d-%H-%M")
179180

180181
async def on_mouse_down(self, event: MouseEvent) -> None:
181182
"""
@@ -407,21 +408,23 @@ def save_history_log(self, output_dir: Path | str = None) -> Optional[Path]:
407408
# Log tittle
408409
log_lines = [
409410
"╔" + "═" * 78 + "╗",
410-
f"║ VulcanAI Console Session History".ljust(79) + "║",
411+
"║ VulcanAI Console Session History".ljust(79) + "║",
411412
f"║ Execution Time: {self.execution_time}".ljust(79) + "║",
412413
"╚" + "═" * 78 + "╝",
413-
""
414+
"",
414415
]
415416

416417
# Add queries from manager history
417-
if self.manager and hasattr(self.manager, 'history') and self.manager.history:
418+
if self.manager and hasattr(self.manager, "history") and self.manager.history:
418419
log_lines.append(f"Total Queries: {len(self.manager.history)}")
419420
log_lines.append("-" * 48)
420421
log_lines.append("")
421422

422423
for i, (user_text, plan_summary) in enumerate(self.manager.history, 1):
423424
log_lines.append(f"Query #{i}")
424-
log_lines.append(f" User Input: {user_text.split(chr(10))[-1] if chr(10) in user_text else user_text}")
425+
log_lines.append(
426+
f" User Input: {user_text.split(chr(10))[-1] if chr(10) in user_text else user_text}"
427+
)
425428
log_lines.append(f" Plan Summary: {plan_summary}")
426429
log_lines.append("")
427430
else:
@@ -467,10 +470,7 @@ def save_plans_to_json(self, output_dir: Path | str = None) -> list[Path]:
467470
plan_dict = plan.model_dump()
468471

469472
# Save to file
470-
filepath.write_text(
471-
json.dumps(plan_dict, indent=2),
472-
encoding="utf-8"
473-
)
473+
filepath.write_text(json.dumps(plan_dict, indent=2), encoding="utf-8")
474474

475475
saved_files.append(filepath)
476476
self.logger.log_console(f"Saved plan {idx} to: {filepath}")
@@ -503,7 +503,7 @@ def load_and_execute_plan(self, plan_file: Path | str) -> Optional[dict]:
503503
plan = GlobalPlan.model_validate(plan_data)
504504

505505
self.logger.log_console(f"Loaded plan from: {plan_file}")
506-
self.logger.log_console(f"Executing plan...")
506+
self.logger.log_console("Executing plan...")
507507

508508
# Execute the plan using the manager's executor and blackboard
509509
result = self.manager.executor.run(plan, self.manager.bb)

0 commit comments

Comments
 (0)