File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
src/agentlab/agents/generic_agent_hinter Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 1- from agentlab .agents .hint_use_agent import *
2- import warnings
3- import sys
1+ import importlib , sys , warnings
2+
3+ OLD = __name__
4+ NEW = "agentlab.agents.hint_use_agent"
5+ SUBS = ("agent_configs" , "generic_agent_prompt" , "generic_agent" , "tmlr_config" )
46
57warnings .warn (
6- "generic_agent_hinter is renamed to hint_use_agent. " ,
8+ f" { OLD } is renamed to { NEW } . { OLD } will be removed in future " ,
79 DeprecationWarning ,
810 stacklevel = 2 ,
911)
1012
11- # Create module alias - redirect old module to new module
12- import agentlab .agents .hint_use_agent as new_module
13-
14- sys .modules ["agentlab.agents.generic_agent_hinter" ] = new_module
13+ # Alias the top-level
14+ new_mod = importlib .import_module (NEW )
15+ sys .modules [OLD ] = new_mod
1516
16- # Re-export everything from the new location
17- from agentlab .agents .hint_use_agent import *
17+ # Alias known submodules
18+ for sub in SUBS :
19+ sys .modules [f"{ OLD } .{ sub } " ] = importlib .import_module (f"{ NEW } .{ sub } " )
You can’t perform that action at this time.
0 commit comments