Skip to content

Commit d43cebb

Browse files
Fix remaining patch target in subagent registry test
Update patch target from deprecated openhands.sdk.context.skills.skill to new canonical path openhands.sdk.skills.skill Co-authored-by: openhands <openhands@all-hands.dev>
1 parent c1d752b commit d43cebb

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

openhands-agent-server/openhands/agent_server/skills_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from dataclasses import dataclass
2121
from pathlib import Path
2222

23+
from openhands.sdk.logger import get_logger
2324
from openhands.sdk.skills import (
2425
Skill,
2526
load_available_skills,
@@ -34,7 +35,6 @@
3435
get_skills_cache_dir,
3536
update_skills_repository,
3637
)
37-
from openhands.sdk.logger import get_logger
3838
from openhands.sdk.utils import sanitized_env
3939

4040

tests/sdk/context/test_agent_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
from pydantic import SecretStr
55

66
from openhands.sdk.context.agent_context import AgentContext
7+
from openhands.sdk.llm import Message, TextContent
8+
from openhands.sdk.secret import LookupSecret, StaticSecret
79
from openhands.sdk.skills import (
810
KeywordTrigger,
911
Skill,
1012
)
11-
from openhands.sdk.llm import Message, TextContent
12-
from openhands.sdk.secret import LookupSecret, StaticSecret
1313

1414

1515
class TestAgentContext:

tests/sdk/conversation/test_repo_root_project_skills.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
from openhands.sdk.agent import Agent
66
from openhands.sdk.context.agent_context import AgentContext
7-
from openhands.sdk.skills import load_project_skills
87
from openhands.sdk.conversation.impl.local_conversation import LocalConversation
98
from openhands.sdk.event import SystemPromptEvent
109
from openhands.sdk.llm import Message, TextContent
10+
from openhands.sdk.skills import load_project_skills
1111
from openhands.sdk.testing import TestLLM
1212

1313

tests/sdk/llm/test_prompt_caching_cross_conversation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from pydantic import SecretStr
1212

1313
from openhands.sdk import LLM, Agent, AgentContext
14-
from openhands.sdk.skills import Skill
1514
from openhands.sdk.llm import Message, TextContent
15+
from openhands.sdk.skills import Skill
1616

1717

1818
def test_static_system_message_is_constant_across_different_contexts():

tests/sdk/plugin/test_plugin_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
from openhands.sdk import LLM, Agent
1010
from openhands.sdk.context import AgentContext
11-
from openhands.sdk.skills import Skill
1211
from openhands.sdk.hooks import HookConfig
1312
from openhands.sdk.hooks.config import HookDefinition, HookMatcher
1413
from openhands.sdk.plugin import (
1514
PluginFetchError,
1615
PluginSource,
1716
load_plugins,
1817
)
18+
from openhands.sdk.skills import Skill
1919

2020

2121
@pytest.fixture

tests/sdk/plugin/test_plugin_merging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import pytest
44

55
from openhands.sdk.context import AgentContext
6-
from openhands.sdk.skills import Skill
76
from openhands.sdk.plugin import Plugin, PluginManifest
7+
from openhands.sdk.skills import Skill
88

99

1010
class TestPluginAddSkillsTo:

tests/sdk/skills/test_installed_skills.py

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

88
import pytest
99

10-
from openhands.sdk.skills.exceptions import SkillValidationError
1110
from openhands.sdk.skills import (
1211
InstalledSkillsMetadata,
1312
disable_skill,
@@ -20,6 +19,7 @@
2019
uninstall_skill,
2120
update_skill,
2221
)
22+
from openhands.sdk.skills.exceptions import SkillValidationError
2323

2424

2525
def _create_skill_dir(

tests/sdk/subagent/test_subagent_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def test_agent_definition_to_factory_skills_project_over_user(tmp_path: Path) ->
346346
skills=["shared-skill"],
347347
)
348348

349-
with patch("openhands.sdk.context.skills.skill.Path.home", return_value=user_home):
349+
with patch("openhands.sdk.skills.skill.Path.home", return_value=user_home):
350350
factory = agent_definition_to_factory(agent_def, work_dir=tmp_path)
351351

352352
llm = _make_test_llm()

0 commit comments

Comments
 (0)