fix(tui): extract @token text correctly in on_input_submitted suggestions query #11226
@@ -7,6 +7,13 @@ Changed `wf10_batch.robot` to be less likely to create files, and
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- **fix(tui): extract @token text correctly in on_input_submitted
|
||||
suggestions query (PR #11004 / issue #4741)** — The TUI handler passed
|
||||
``text.replace("@", "").strip()`` to ``suggestions()``, producing garbage
|
||||
fuzzy matches (e.g. "analyse \@proj" → "analyse proj"). Replaced with
|
||||
``re.findall(r"@(\S+)", text)`` that extracts only the last ``@token`` as
|
||||
the query, returning just the token value without surrounding words.
|
||||
|
||||
- **SubplanExecutionService lazy wiring in CLI** (#10268): Wired `subplan_service`
|
||||
from the DI container into `_get_plan_executor()` so `PlanExecutor` can spawn child
|
||||
plans during the Execute phase. When `SubplanService` is available but
|
||||
|
||||
@@ -48,3 +48,4 @@ Below are some of the specific details of various contributions.
|
||||
* HAL 9000 has contributed the DecisionService wiring for PlanExecutor strategize persistence fix (#10813): added decision_service to the PlanExecutor constructor and wired it from the CLI dependency-injection container in `_get_plan_executor()`, plus implemented `_persist_strategy_decisions()` to persist strategy decisions as domain `Decision` objects.
|
||||
* HAL 9000 has contributed the A2A module rename standardization BDD tests (PR #10583 / issue #8615): comprehensive Behave test suite validating that all 22 A2A symbols are properly exported from `cleveragents.a2a`, no legacy ACP references remain in the module source, and documentation uses correct A2A naming conventions — fixing inline imports, unused behave symbols, cross-scenario context dependencies, and missing type annotations.
|
||||
* HAL 9000 has contributed the `ActorSelectionOverlay._render` → `_refresh_display` rename fix (PR #11176 / issue #11039, Epic #8174): renamed `_render()` method to `_refresh_display()` to avoid shadowing Textual's `Widget._render()`, fixing a crash in textual >=1.0 where `get_content_height()` would receive `None` and raise `AttributeError: 'NoneType' object has no attribute 'get_height'`.
|
||||
* HAL 9000 has contributed the TUI @token text extraction fix for suggestions query (PR #11004 / issue #4741): replaced ``text.replace("@", "").strip()`` with ``re.findall(r"@(\S+)", text)[-1]`` in ``on_input_submitted`` to correctly extract only the last @token as the query, preventing garbage fuzzy matches. Includes TDD BDD regression test suite covering single-token, category-prefixed, multi-token, and standalone-token scenarios (PR #11004).
|
||||
|
||||
@@ -0,0 +1,252 @@
|
||||
|
|
||||
"""Step definitions for TDD issue #4741: @token text extraction for suggestions().
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
Verifies that ``on_input_submitted`` in ``src/cleveragents/tui/app.py`` extracts
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
only the last ``@token`` from input using regex (``re.findall(r"@(\\S+)", text)``),
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
instead of the buggy ``text.replace("@", "").strip()``.
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
Uses a Scenario Outline so each <input> / <expected_query> pair is tested identically.
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
"""
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
from __future__ import annotations
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
HAL9001
commented
Suggestion: **Suggestion:** `MagicMock` and `patch` imported from unittest.mock but never used in the file. Remove unused imports.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
import contextlib
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
import importlib
|
||||
|
HAL9001
commented
BLOCKING: Unused import re on line 13 (F401 ruff error). Remove it. Automated by CleverAgents Bot **BLOCKING:** Unused import re on line 13 (F401 ruff error). Remove it.
---
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
import shutil
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
import sys
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
import tempfile
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
from pathlib import Path
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
from types import ModuleType, SimpleNamespace
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
from typing import Any
|
||||
|
HAL9001
commented
SUGGESTION: Unused patch import from unittest.mock on line 19. Remove it. Automated by CleverAgents Bot **SUGGESTION:** Unused patch import from unittest.mock on line 19. Remove it.
---
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
HAL9001
commented
BLOCKING (unused import): BLOCKING (unused import): `patch` from `unittest.mock` is imported but never used (ruff F401). Remove it: `from unittest.mock import MagicMock`.
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
HAL9001
commented
SUGGESTION - Unused imports: Prior lint reviews flagged unused imports (e.g., SUGGESTION - Unused imports: Prior lint reviews flagged unused imports (e.g., `re` imported but not used in the test file, and possibly `patch`). Run `nox -s lint` within the test file scope to identify and remove any dead imports. This wasn't clearly visible from the diff alone.
|
||||
from unittest.mock import MagicMock
|
||||
|
HAL9001
commented
Unused imports: re (line ~15) and patch (line ~20) are imported but never called. This is what the CI lint job flags. Please remove them. Automated by CleverAgents Bot Unused imports: re (line ~15) and patch (line ~20) are imported but never called. This is what the CI lint job flags. Please remove them.
---
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
from behave import given, then
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# Mock Textual
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
_MOCK_TEXTUAL_KEYS = [
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
"textual",
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
"textual.app",
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
"textual.containers",
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
"textual.widgets",
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
]
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def _build_mock_textual() -> dict[str, ModuleType]:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_textual = ModuleType("textual")
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_app_mod = ModuleType("textual.app")
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_containers = ModuleType("textual.containers")
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_widgets = ModuleType("textual.widgets")
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
class MockApp:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def __init__(self, *a, **kw):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
pass
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
class MockVertical:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def __enter__(self):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
return self
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def __exit__(self, *a, **kw):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
pass
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
class MockHeader:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
pass
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
class MockFooter:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
pass
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
class MockStatic:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def __init__(self, *a, **kw):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
self._text = ""
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def update(self, text):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
self._text = str(text)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
class MockInput:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
value: str = ""
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def __init__(self, *a, **kw):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
pass
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def consume_text(self):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
return SimpleNamespace(text=self.value)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_app_mod.App = MockApp
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_containers.Vertical = MockVertical
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_widgets.Header = MockHeader
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_widgets.Footer = MockFooter
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_widgets.Static = MockStatic
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_widgets.Input = MockInput
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
return {
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
"textual": mock_textual,
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
"textual.app": mock_app_mod,
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
"textual.containers": mock_containers,
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
"textual.widgets": mock_widgets,
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
}
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def _restore_modules(context):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
for key, val in getattr(context, "_tui_saved_modules", {}).items():
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
if val is None:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
sys.modules.pop(key, None)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
else:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
sys.modules[key] = val
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.reload(
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.import_module("cleveragents.tui.widgets.help_panel_overlay")
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.reload(importlib.import_module("cleveragents.tui.widgets.persona_bar"))
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.reload(importlib.import_module("cleveragents.tui.widgets.prompt"))
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.reload(
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.import_module("cleveragents.tui.widgets.reference_picker")
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.reload(
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.import_module("cleveragents.tui.widgets.slash_command_overlay")
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.reload(importlib.import_module("cleveragents.tui.app"))
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# Given: set up mock + run on_input_submitted with the captured input text
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
@given('the TUI on_input_submitted handler processes "{input_text}"')
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def step_run_on_input_submitted(context, input_text):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
"""Install mock Textual, create app, simulate submission, capture query.
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
We patch both ``ReferencePickerOverlay.set_suggestions`` and the module-level
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
``suggestions()`` so we can inspect the exact argument passed to it.
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
"""
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# Remove saved modules from any previous scenario (Scenario Outline)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
_restore_modules(context) if getattr(context, "_tui_saved_modules", None) else None
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mocks = _build_mock_textual()
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
context._tui_saved_modules = {}
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
for key in _MOCK_TEXTUAL_KEYS:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
context._tui_saved_modules[key] = sys.modules.pop(key, None)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
for key, mod in mocks.items():
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
sys.modules[key] = mod
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# Reload widget modules with mocked base classes
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
from cleveragents.tui.widgets import (
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
help_panel_overlay as hp_mod,
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
persona_bar as pb_mod,
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
prompt as prompt_mod,
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
reference_picker as rp_mod,
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
slash_command_overlay as sco_mod,
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.reload(hp_mod)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.reload(pb_mod)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.reload(prompt_mod)
|
||||
|
HAL9001
commented
SUGGESTION: Tempdir leak. tempfile.mkdtemp() creates a directory that is never cleaned up. Add shutil.rmtree() cleanup. Automated by CleverAgents Bot **SUGGESTION:** Tempdir leak. tempfile.mkdtemp() creates a directory that is never cleaned up. Add shutil.rmtree() cleanup.
---
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
HAL9001
commented
BLOCKING (tempdir leak): BLOCKING (tempdir leak): `tempfile.mkdtemp()` at line 148 creates a temporary directory that is never removed. This will leak tempdirs across test scenarios. Add cleanup via `shutil.rmtree(context._tui_tmpdir)` in the context.add_cleanup chain.
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
HAL9001
commented
BLOCKING: tempfile.mkdtemp() creates a temp directory stored in context._tui_tmpdir but never cleaned up. Add **BLOCKING: tempfile.mkdtemp() creates a temp directory stored in context._tui_tmpdir but never cleaned up.** Add `shutil.rmtree(context._tui_tmpdir, ignore_errors=True)` in the cleanup function registered via add_cleanup.
HAL9001
commented
SUGGESTION - Tempdir cleanup: Previous reviews noted a SUGGESTION - Tempdir cleanup: Previous reviews noted a `tempfile.mkdtemp()` call around line ~148 that isn't paired with `shutil.rmtree()`. Please ensure any temporary directories created during test setup are explicitly cleaned up in the teardown/cleanup phase to prevent filesystem leaks. This wasn't addressable from the review-only read.
|
||||
importlib.reload(rp_mod)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.reload(sco_mod)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# Install mock persona state and command router before app module reloads
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
tmp_dir = tempfile.mkdtemp()
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
context._tui_tmpdir = Path(tmp_dir)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
HAL9001
commented
BLOCKING: Tuple-returning lambda as Behave cleanup. **BLOCKING: Tuple-returning lambda as Behave cleanup.** `context.add_cleanup(lambda: (importlib.reload(__import__(...)),))` returns a tuple -- fragile and unclear. Refactor to a named function.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
from cleveragents.tui.persona.registry import PersonaRegistry
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
from cleveragents.tui.persona.state import PersonaState
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
registry = PersonaRegistry(config_dir=Path(tmp_dir))
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
registry.ensure_default()
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
persona_state = PersonaState(registry=registry)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
class MockCommandRouter:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def handle(self, raw, *, session_id):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
return f"handled:{raw}"
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_router = MockCommandRouter()
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
context._tui_persona_state = persona_state
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
context._tui_cmd_router = mock_router
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
app_mod = importlib.import_module("cleveragents.tui.app")
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
importlib.reload(app_mod)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# Patch the suggestions function BEFORE instantiating the app, so that when
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# on_input_submitted calls it internally, our spy intercepts it.
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
captured_queries: list[str] = []
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def _spy_suggestions(query, *, category=None, limit=8):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
captured_queries.append(query)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
return list(
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
app_mod.suggestions.__wrapped__.__code__.co_varnames[:limit]
|
||||
|
HAL9001
commented
Tempdir leak (line ~182): tempfile.mkdtemp() creates a directory stored in context._tui_tmpdir but never cleaned up. Add cleanup to context.add_cleanup chain. Automated by CleverAgents Bot Tempdir leak (line ~182): tempfile.mkdtemp() creates a directory stored in context._tui_tmpdir but never cleaned up. Add cleanup to context.add_cleanup chain.
---
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
) # dummy
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# The suggestions function is imported at module level in app.py. We need to
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# patch it there, not on reference_parser itself.
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def spy(query, **kw):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
captured_queries.append(query)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
return []
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
app_mod.suggestions = spy
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
cls = app_mod._ResolvedTuiApp
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# Build mock widgets dict so query_one works
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
app_inst = cls(command_router=mock_router, persona_state=persona_state)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# Manually populate _widgets from the MockApp instance if it exists
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
if hasattr(app_inst, "_widgets"):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
wdict: dict[str, Any] = app_inst._widgets
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
else:
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
wdict = {}
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# Create mock widgets that behave correctly
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_prompt = MagicMock()
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_prompt.consume_text.return_value = SimpleNamespace(text=input_text)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_picker = MagicMock()
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_picker.set_suggestions = lambda q, s: None # dummy, we spy suggestions instead
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
wdict["#reference-picker"] = mock_picker
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_prompt_widget = MagicMock()
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
mock_prompt_widget.consume_text.return_value = SimpleNamespace(text=input_text)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
wdict["#prompt"] = mock_prompt_widget
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
wdict["#conversation"] = MagicMock()
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
wdict["#help-panel"] = MagicMock()
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
wdict["#persona-bar"] = MagicMock()
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# Patch query_one to use our widget dict
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
app_inst.query_one = lambda sel, *args, **kw: wdict.get(sel, MagicMock())
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
with contextlib.suppress(Exception):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
app_inst.on_input_submitted(event=MagicMock())
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Broken cleanup lambda (line ~225): The lambda creates a tuple but never executes the reload call - this is a no-op. Fix: change to direct call or remove entirely since _restore_modules() handles restoration. Automated by CleverAgents Bot Broken cleanup lambda (line ~225): The lambda creates a tuple but never executes the reload call - this is a no-op. Fix: change to direct call or remove entirely since _restore_modules() handles restoration.
---
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
context._tui_captured_query = captured_queries[0] if captured_queries else None
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def _cleanup():
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
if hasattr(app_inst, "_widgets"):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
app_inst._widgets.clear()
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def _cleanup_tmpdir(d=context._tui_tmpdir):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
if d is not None and d.exists():
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
shutil.rmtree(str(d), ignore_errors=True)
|
||||
|
HAL9001
commented
BLOCKING: Broken lambda cleanup. This creates a no-op tuple instead of calling reload(). Fix the parentheses to properly invoke the function. Automated by CleverAgents Bot **BLOCKING:** Broken lambda cleanup. This creates a no-op tuple instead of calling reload(). Fix the parentheses to properly invoke the function.
---
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
HAL9001
commented
BLOCKING (no-op lambda): This lambda constructs a tuple without calling anything. BLOCKING (no-op lambda): This lambda constructs a tuple without calling anything. `(importlib.reload(...),)` is a no-op — it just creates a single-element tuple and discards it. Must be: `lambda: importlib.reload(__import__("cleveragents.tui.app"))`
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
context.add_cleanup(_cleanup)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
context.add_cleanup(lambda: _restore_modules(context))
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
context.add_cleanup(_cleanup_tmpdir)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# Then: assertion on the captured query
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
@then('the suggestion query should be "{expected}"')
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
def step_suggestion_query_is_correct(context, expected):
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
assert context._tui_captured_query == expected, (
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
f"Bug #4741: extracted suggestion query was "
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
f"{context._tui_captured_query!r}, expected {expected!r}. "
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
f"The old buggy .replace(@).strip() approach produces garbage matches."
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
)
|
||||
|
HAL9001
commented
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),)) The trailing comma converts it to a one-element tuple Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing ``importlib.reload()``. The line:
context.add_cleanup(lambda: (importlib.reload(__import__("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple `(reload(),)` which is never called. Remove the trailing comma, or better yet, remove this line entirely since ``_restore_modules()`` already handles module reload as an earlier cleanup step.
|
||||
@@ -0,0 +1,23 @@
|
||||
@tdd_issue @tdd_issue_4741
|
||||
Feature: TDD Issue #4741 — Extract only the @token text as suggestions() query
|
||||
|
||||
Bug #4741: ``on_input_submitted`` passed ``text.replace("@", "").strip()`` to
|
||||
``suggestions()``, e.g. "analyse \@proj" → "analyse proj", producing garbage
|
||||
fuzzy matches because surrounding words polluted the query.
|
||||
|
||||
The fix replaces it with ``re.findall(r"@(\S+)", text)`` taking the last
|
||||
match as the query string, so "analyse \@proj" → "proj".
|
||||
|
||||
Scenario Outline: @token extraction produces correct queries for input text
|
||||
The suggestion query must be the last extracted @token from input text.
|
||||
|
HAL9001
commented
SUGGESTION: Remove @tdd_expected_fail tag now that the fix is implemented and tests pass. Automated by CleverAgents Bot **SUGGESTION:** Remove @tdd_expected_fail tag now that the fix is implemented and tests pass.
---
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
|
||||
With the old buggy code these assertions fail; after the fix they pass.
|
||||
|
||||
Given the TUI on_input_submitted handler processes "<input>"
|
||||
Then the suggestion query should be "<expected_query>"
|
||||
|
||||
Examples:
|
||||
| input | expected_query |
|
||||
| analyse @proj | proj |
|
||||
| read @project:main-doc | project:main-doc |
|
||||
| look-up @actor:x @tool:y | tool:y |
|
||||
| @skill:doc-generator | skill:doc-generator |
|
||||
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
import importlib
|
||||
import os
|
||||
import re
|
||||
|
HAL9001
commented
BLOCKING: Import order violation. BLOCKING: Import order violation. `import re` (stdlib) must precede non-stdlib or local imports per ruff conventions. Run `nox -s lint` to see exact violations.
HAL9001
commented
BLOCKING - Import ordering (ruff lint F401): BLOCKING - Import ordering (ruff lint F401):
after this file was originally reviewed with lint failures, please verify `import re` is placed in correct standard-library position (before third-party imports like `textual`). The previous review flagged this as a hard lint failure. Please run `nox -s lint` and ensure zero violations before resubmitting.
|
||||
from dataclasses import dataclass, field
|
||||
from typing import TYPE_CHECKING, Any, ClassVar, Protocol
|
||||
|
||||
@@ -396,10 +397,13 @@ if _TEXTUAL_AVAILABLE:
|
||||
|
||||
expanded = result.expanded_text
|
||||
if "@" in text:
|
||||
ref_picker = self.query_one("#reference-picker", ReferencePickerOverlay)
|
||||
ref_picker.set_suggestions(
|
||||
text, suggestions(text.replace("@", "").strip())
|
||||
)
|
||||
matches = re.findall(r"@(\S+)", text)
|
||||
if matches:
|
||||
query_text = matches[-1]
|
||||
ref_picker = self.query_one(
|
||||
"#reference-picker", ReferencePickerOverlay
|
||||
)
|
||||
ref_picker.set_suggestions(text, suggestions(query_text))
|
||||
|
||||
if self._facade is None:
|
||||
# Facade not wired yet — preview only (graceful degradation)
|
||||
|
||||
Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing
importlib.reload(). The line:context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple
(reload(),)which is never called. Remove the trailing comma, or better yet, remove this line entirely since_restore_modules()already handles module reload as an earlier cleanup step.Test cleanup lambda has a trailing comma making it a no-op tuple instead of executing
importlib.reload(). The line:context.add_cleanup(lambda: (importlib.reload(import("cleveragents.tui.app")),))
The trailing comma converts it to a one-element tuple
(reload(),)which is never called. Remove the trailing comma, or better yet, remove this line entirely since_restore_modules()already handles module reload as an earlier cleanup step.