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:
Greyson Lalonde
2026-05-05 03:50:09 +08:00
parent e8bf900008
commit 778130cfc7
4 changed files with 10 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ class TestPlusAPI(unittest.TestCase):
response = self.api.login_to_tool_repository()
mock_make_request.assert_called_once_with(
"POST", "/crewai_plus/api/v1/tools/login"
"POST", "/crewai_plus/api/v1/tools/login", json={}
)
self.assertEqual(response, mock_response)
@@ -67,7 +67,7 @@ class TestPlusAPI(unittest.TestCase):
response = self.api.login_to_tool_repository()
self.assert_request_with_org_id(
mock_client_instance, "POST", "/crewai_plus/api/v1/tools/login"
mock_client_instance, "POST", "/crewai_plus/api/v1/tools/login", json={}
)
self.assertEqual(response, mock_response)