Skip to content

Commit

Permalink
style: fix mypy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Dec 30, 2024
1 parent 62173b1 commit b1844f1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions openhands/core/microagents.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,14 @@ class MicroAgentHub:
task_agents: Dict[str, TaskAgent]

@classmethod
def load(cls, root_dir: Union[str, Path] = None) -> 'MicroAgentHub':
def load(cls, root_dir: Optional[Union[str, Path]] = None) -> 'MicroAgentHub':
"""Load all microagents from the given directory."""
if root_dir is None:
# Default to the package's microagents directory
root_dir = Path(__file__).parent.parent.parent / 'microagents'
elif isinstance(root_dir, str):
root_dir = Path(root_dir)
# Default to the package's microagents directory
root_dir = (
Path(__file__).parent.parent.parent / 'microagents'
if root_dir is None
else Path(root_dir)
)

repo_agents = {}
keyword_agents = {}
Expand Down

0 comments on commit b1844f1

Please sign in to comment.