Skip to content

Commit 7a451a8

Browse files
fix: resolve Python 3.8 compatibility issue with tuple type annotation
- Change `tuple[List[Agent], List[Task]]` to `Tuple[List[Agent], List[Task]]` in autoagents.py:258 - Add `Tuple` import to typing imports - Add `requires-python = ">=3.8"` to pyproject.toml Fixes #388 Co-authored-by: MervinPraison <MervinPraison@users.noreply.github.com>
1 parent 9f3f7aa commit 7a451a8

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/praisonai-agents/praisonaiagents/agents/autoagents.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from .agents import PraisonAIAgents
99
from ..agent.agent import Agent
1010
from ..task.task import Task
11-
from typing import List, Any, Optional, Dict
11+
from typing import List, Any, Optional, Dict, Tuple
1212
import logging
1313
import os
1414
from pydantic import BaseModel
@@ -255,7 +255,7 @@ def _generate_config(self) -> AutoAgentsConfig:
255255
logging.error(f"Error generating configuration: {e}")
256256
raise
257257

258-
def _create_agents_and_tasks(self, config: AutoAgentsConfig) -> tuple[List[Agent], List[Task]]:
258+
def _create_agents_and_tasks(self, config: AutoAgentsConfig) -> Tuple[List[Agent], List[Task]]:
259259
"""Create agents and tasks from configuration"""
260260
agents = []
261261
tasks = []

src/praisonai-agents/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "praisonaiagents"
77
version = "0.0.89"
88
description = "Praison AI agents for completing complex tasks with Self Reflection Agents"
9+
requires-python = ">=3.8"
910
authors = [
1011
{ name="Mervin Praison" }
1112
]

0 commit comments

Comments
 (0)