fix: resolve CI/CD issues for Python project
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
"""Command history learning system for ShellGenius."""
|
"""Command history learning system for ShellGenius."""
|
||||||
|
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
@@ -154,9 +153,9 @@ class HistoryStorage:
|
|||||||
description=entry["description"],
|
description=entry["description"],
|
||||||
commands=entry["commands"],
|
commands=entry["commands"],
|
||||||
shell_type=entry["shell_type"],
|
shell_type=entry["shell_type"],
|
||||||
usage_count=e.get("usage_count", 1),
|
usage_count=entry.get("usage_count", 1),
|
||||||
tags=e.get("tags", []),
|
tags=entry.get("tags", []),
|
||||||
success=e.get("success", True),
|
success=entry.get("success", True),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if len(results) >= limit:
|
if len(results) >= limit:
|
||||||
@@ -316,7 +315,7 @@ class HistoryLearner:
|
|||||||
"""
|
"""
|
||||||
entries = self.storage.get_entries(limit=100)
|
entries = self.storage.get_entries(limit=100)
|
||||||
|
|
||||||
patterns = {
|
patterns: Dict[str, Dict[str, int]] = {
|
||||||
"shell_types": {},
|
"shell_types": {},
|
||||||
"common_commands": {},
|
"common_commands": {},
|
||||||
"frequent_tags": {},
|
"frequent_tags": {},
|
||||||
|
|||||||
Reference in New Issue
Block a user