mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-05 17:22:36 +00:00
fix: resolve mypy errors after merge
- Re-export get_crewai_version explicitly so consumers stop getting
attr-defined.
- Drop the telemetry call in TemplateCommand.add_template; the
standalone CLI's BaseCommand intentionally has no _telemetry, matching
the choice already made for DeployCommand.
- Add the user_identifier kwarg to crewai_cli's
PlusAPI.login_to_tool_repository so tools.main.login keeps working
and the surface matches crewai.plus_api.
- Update the lib/cli login tests for the new json={} payload.
This commit is contained in:
@@ -48,8 +48,13 @@ class PlusAPI:
|
||||
with httpx.Client(trust_env=False, verify=verify) as client:
|
||||
return client.request(method, url, headers=self.headers, **kwargs)
|
||||
|
||||
def login_to_tool_repository(self) -> httpx.Response:
|
||||
return self._make_request("POST", f"{self.TOOLS_RESOURCE}/login")
|
||||
def login_to_tool_repository(
|
||||
self, user_identifier: str | None = None
|
||||
) -> httpx.Response:
|
||||
payload = {}
|
||||
if user_identifier:
|
||||
payload["user_identifier"] = user_identifier
|
||||
return self._make_request("POST", f"{self.TOOLS_RESOURCE}/login", json=payload)
|
||||
|
||||
def get_tool(self, handle: str) -> httpx.Response:
|
||||
return self._make_request("GET", f"{self.TOOLS_RESOURCE}/{handle}")
|
||||
|
||||
Reference in New Issue
Block a user