mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
Fix type-checker errors in utils.py
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -83,14 +83,15 @@ def _get_project_attribute(
|
|||||||
pyproject_content = parse_toml(f.read())
|
pyproject_content = parse_toml(f.read())
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
calling_frame = inspect.currentframe().f_back
|
calling_frame = inspect.currentframe()
|
||||||
calling_function = calling_frame.f_code.co_name
|
if calling_frame and calling_frame.f_back and calling_frame.f_back.f_code:
|
||||||
if calling_function != "reset_memories":
|
calling_function = calling_frame.f_back.f_code.co_name
|
||||||
dependencies = (
|
if calling_function != "reset_memories":
|
||||||
_get_nested_value(pyproject_content, ["project", "dependencies"]) or []
|
dependencies = (
|
||||||
)
|
_get_nested_value(pyproject_content, ["project", "dependencies"]) or []
|
||||||
if not any(True for dep in dependencies if "crewai" in dep):
|
)
|
||||||
raise Exception("crewai is not in the dependencies.")
|
if not any(True for dep in dependencies if "crewai" in dep):
|
||||||
|
raise Exception("crewai is not in the dependencies.")
|
||||||
|
|
||||||
attribute = _get_nested_value(pyproject_content, keys)
|
attribute = _get_nested_value(pyproject_content, keys)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
|||||||
Reference in New Issue
Block a user