Skip to content

Commit ede1cf3

Browse files
committed
Fix CI: ruff lint/format, pyright TTLCache typing, regenerate UI snapshots
1 parent 652e9e0 commit ede1cf3

126 files changed

Lines changed: 580 additions & 359 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎albert_code/acp/acp_agent_loop.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,7 @@ async def initialize(
189189
),
190190
protocol_version=PROTOCOL_VERSION,
191191
agent_info=Implementation(
192-
name="@mistralai/albert-code",
193-
title="Albert Code",
194-
version=__version__,
192+
name="@mistralai/albert-code", title="Albert Code", version=__version__
195193
),
196194
auth_methods=auth_methods,
197195
)

‎albert_code/acp/acp_logger.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
ACP_LOGGING_ENABLED_KEY = "VIBE_ACP_LOGGING_ENABLED"
2323

24-
_session_cache: TTLCache[int | str, str] = TTLCache(maxsize=1000, ttl=3600)
24+
_session_cache: TTLCache[int | str, str] = TTLCache[int | str, str](maxsize=1000, ttl=3600)
2525
_current_session: str | None = None
2626
_logger: logging.Logger | None = None
2727

‎albert_code/acp/entrypoint.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
from albert_code import __version__
99
from albert_code.core.config import VibeConfig
1010
from albert_code.core.logger import logger
11-
from albert_code.core.paths.config_paths import CONFIG_FILE, HISTORY_FILE, unlock_config_paths
11+
from albert_code.core.paths.config_paths import (
12+
CONFIG_FILE,
13+
HISTORY_FILE,
14+
unlock_config_paths,
15+
)
1216

1317
# Configure line buffering for subprocess communication
1418
sys.stdout.reconfigure(line_buffering=True) # pyright: ignore[reportAttributeAccessIssue]

‎albert_code/acp/tools/builtins/bash.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
from albert_code.acp.tools.base import AcpToolState, BaseAcpTool
1616
from albert_code.core.logger import logger
1717
from albert_code.core.tools.base import BaseToolState, InvokeContext, ToolError
18-
from albert_code.core.tools.builtins.bash import Bash as CoreBashTool, BashArgs, BashResult
18+
from albert_code.core.tools.builtins.bash import (
19+
Bash as CoreBashTool,
20+
BashArgs,
21+
BashResult,
22+
)
1923
from albert_code.core.types import ToolCallEvent, ToolResultEvent, ToolStreamEvent
2024

2125

@@ -24,7 +28,9 @@ class AcpBashState(BaseToolState, AcpToolState):
2428

2529

2630
class Bash(CoreBashTool, BaseAcpTool[AcpBashState]):
27-
prompt_path = ALBERT_CODE_ROOT / "core" / "tools" / "builtins" / "prompts" / "bash.md"
31+
prompt_path = (
32+
ALBERT_CODE_ROOT / "core" / "tools" / "builtins" / "prompts" / "bash.md"
33+
)
2834
state: AcpBashState
2935

3036
@classmethod

‎albert_code/acp/tools/builtins/read_file.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ class AcpReadFileState(BaseToolState, AcpToolState):
2121

2222
class ReadFile(CoreReadFileTool, BaseAcpTool[AcpReadFileState]):
2323
state: AcpReadFileState
24-
prompt_path = ALBERT_CODE_ROOT / "core" / "tools" / "builtins" / "prompts" / "read_file.md"
24+
prompt_path = (
25+
ALBERT_CODE_ROOT / "core" / "tools" / "builtins" / "prompts" / "read_file.md"
26+
)
2527

2628
@classmethod
2729
def _get_tool_state_class(cls) -> type[AcpReadFileState]:

‎albert_code/acp/tools/builtins/search_replace.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ class AcpSearchReplaceState(BaseToolState, AcpToolState):
2828
class SearchReplace(CoreSearchReplaceTool, BaseAcpTool[AcpSearchReplaceState]):
2929
state: AcpSearchReplaceState
3030
prompt_path = (
31-
ALBERT_CODE_ROOT / "core" / "tools" / "builtins" / "prompts" / "search_replace.md"
31+
ALBERT_CODE_ROOT
32+
/ "core"
33+
/ "tools"
34+
/ "builtins"
35+
/ "prompts"
36+
/ "search_replace.md"
3237
)
3338

3439
@classmethod

‎albert_code/acp/tools/builtins/todo.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ class AcpTodoState(TodoState, AcpToolState):
2626

2727
class Todo(CoreTodoTool, BaseAcpTool[AcpTodoState]):
2828
state: AcpTodoState
29-
prompt_path = ALBERT_CODE_ROOT / "core" / "tools" / "builtins" / "prompts" / "todo.md"
29+
prompt_path = (
30+
ALBERT_CODE_ROOT / "core" / "tools" / "builtins" / "prompts" / "todo.md"
31+
)
3032

3133
@classmethod
3234
def _get_tool_state_class(cls) -> type[AcpTodoState]:

‎albert_code/acp/utils.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
)
2323

2424
from albert_code.core.agents.models import AgentProfile, AgentType
25-
from albert_code.core.proxy_setup import SUPPORTED_PROXY_VARS, get_current_proxy_settings
25+
from albert_code.core.proxy_setup import (
26+
SUPPORTED_PROXY_VARS,
27+
get_current_proxy_settings,
28+
)
2629
from albert_code.core.types import CompactEndEvent, CompactStartEvent, LLMMessage
2730
from albert_code.core.utils import compact_reduction_display
2831

‎albert_code/cli/entrypoint.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
from albert_code import __version__
1111
from albert_code.core.agents.models import BuiltinAgentName
1212
from albert_code.core.paths.config_paths import unlock_config_paths
13-
from albert_code.core.trusted_folders import has_trustable_content, trusted_folders_manager
13+
from albert_code.core.trusted_folders import (
14+
has_trustable_content,
15+
trusted_folders_manager,
16+
)
1417
from albert_code.setup.trusted_folders.trust_folder_dialog import (
1518
TrustDialogQuitException,
1619
ask_trust_folder,

‎albert_code/cli/textual_ui/app.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@
3535
from albert_code.cli.textual_ui.widgets.chat_input import ChatInputContainer
3636
from albert_code.cli.textual_ui.widgets.compact import CompactMessage
3737
from albert_code.cli.textual_ui.widgets.config_app import ConfigApp
38-
from albert_code.cli.textual_ui.widgets.context_progress import ContextProgress, TokenState
38+
from albert_code.cli.textual_ui.widgets.context_progress import (
39+
ContextProgress,
40+
TokenState,
41+
)
3942
from albert_code.cli.textual_ui.widgets.load_more import HistoryLoadMoreRequested
4043
from albert_code.cli.textual_ui.widgets.loading import LoadingWidget, paused_timer
4144
from albert_code.cli.textual_ui.widgets.messages import (
@@ -888,7 +891,9 @@ def _on_fallback_event(
888891
"""
889892
del remaining_seconds # informational, conveyed via `message`
890893
severity = "warning" if kind == "activated" else "information"
891-
title = "Auto-fallback activated" if kind == "activated" else "Auto-fallback ended"
894+
title = (
895+
"Auto-fallback activated" if kind == "activated" else "Auto-fallback ended"
896+
)
892897
self.notify(message, title=title, severity=severity, timeout=8)
893898

894899
def _format_model_label(self) -> str:

0 commit comments

Comments
 (0)