refactor(api): extract account login service and consolidate adapters - #41184
Open
41tair wants to merge 1 commit into
Open
refactor(api): extract account login service and consolidate adapters#4118441tair wants to merge 1 commit into
41tair wants to merge 1 commit into
Conversation
41tair
requested review from
QuantumGhost,
laipz8200 and
zyssyz123
as code owners
August 24, 2026 12:17
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-08-24 12:19:04.029993162 +0000
+++ /tmp/pyrefly_pr.txt 2026-08-24 12:18:55.890914411 +0000
@@ -785,25 +785,25 @@
ERROR Generator function should return `Generator` [bad-return]
--> tests/test_containers_integration_tests/repositories/test_workflow_run_repository.py:89:56
ERROR Object of class `NoneType` has no attribute `open_id` [missing-attribute]
- --> tests/test_containers_integration_tests/services/test_account_service.py:489:16
+ --> tests/test_containers_integration_tests/services/test_account_service.py:361:16
ERROR Argument `list[str]` is not assignable to parameter `roles` with type `list[TenantAccountRole]` in function `services.account_service.TenantService.has_roles` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_account_service.py:1314:45
+ --> tests/test_containers_integration_tests/services/test_account_service.py:1093:45
ERROR Object of class `NoneType` has no attribute `role` [missing-attribute]
- --> tests/test_containers_integration_tests/services/test_account_service.py:1670:16
+ --> tests/test_containers_integration_tests/services/test_account_service.py:1449:16
ERROR Object of class `NoneType` has no attribute `role` [missing-attribute]
- --> tests/test_containers_integration_tests/services/test_account_service.py:1726:16
+ --> tests/test_containers_integration_tests/services/test_account_service.py:1505:16
ERROR Object of class `NoneType` has no attribute `role` [missing-attribute]
- --> tests/test_containers_integration_tests/services/test_account_service.py:1727:16
+ --> tests/test_containers_integration_tests/services/test_account_service.py:1506:16
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
- --> tests/test_containers_integration_tests/services/test_account_service.py:1851:16
+ --> tests/test_containers_integration_tests/services/test_account_service.py:1630:16
ERROR Argument `dict[str, str | dict[str, bool]]` is not assignable to parameter `value` with type `TenantCustomConfigDict` in function `models.account.Tenant.custom_config_dict` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_account_service.py:2021:37
+ --> tests/test_containers_integration_tests/services/test_account_service.py:1800:37
ERROR TypedDict `TenantCustomConfigDict` does not have key `theme` [bad-typed-dict-key]
- --> tests/test_containers_integration_tests/services/test_account_service.py:2029:33
+ --> tests/test_containers_integration_tests/services/test_account_service.py:1808:33
ERROR TypedDict `TenantCustomConfigDict` does not have key `language` [bad-typed-dict-key]
- --> tests/test_containers_integration_tests/services/test_account_service.py:2030:33
+ --> tests/test_containers_integration_tests/services/test_account_service.py:1809:33
ERROR TypedDict `TenantCustomConfigDict` does not have key `feature_flags` [bad-typed-dict-key]
- --> tests/test_containers_integration_tests/services/test_account_service.py:2031:33
+ --> tests/test_containers_integration_tests/services/test_account_service.py:1810:33
ERROR Argument `dict[str, AppMode | str] | dict[str, str]` is not assignable to parameter `args` with type `AdvancedPromptTemplateArgs` in function `services.advanced_prompt_template_service.AdvancedPromptTemplateService.get_prompt` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_advanced_prompt_template_service.py:718:63
ERROR Argument `dict[str, AppMode | str]` is not assignable to parameter `args` with type `AdvancedPromptTemplateArgs` in function `services.advanced_prompt_template_service.AdvancedPromptTemplateService.get_prompt` [bad-argument-type]
@@ -3426,38 +3426,6 @@
--> tests/unit_tests/controllers/console/app/workflow_draft_variables_test.py:137:47
ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
--> tests/unit_tests/controllers/console/auth/test_forgot_password.py:29:9
-ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:234:16
-ERROR Cannot index into `Mapping[str, object]` [bad-index]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:234:37
-ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:235:16
-ERROR Cannot index into `Mapping[str, object]` [bad-index]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:235:37
-ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:265:16
-ERROR Cannot index into `Mapping[str, object]` [bad-index]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:265:37
-ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:266:16
-ERROR Cannot index into `Mapping[str, object]` [bad-index]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:266:37
-ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:422:16
-ERROR Cannot index into `Mapping[str, object]` [bad-index]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:422:37
-ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:423:16
-ERROR Cannot index into `Mapping[str, object]` [bad-index]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:423:37
-ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:609:16
-ERROR Cannot index into `Mapping[str, object]` [bad-index]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:609:37
-ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:610:16
-ERROR Cannot index into `Mapping[str, object]` [bad-index]
- --> tests/unit_tests/controllers/console/auth/test_login_logout.py:610:37
ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
--> tests/unit_tests/controllers/console/auth/test_oauth.py:287:9
ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
@@ -8663,13 +8631,13 @@
ERROR Object of class `NoneType` has no attribute `get_data` [missing-attribute]
--> tests/unit_tests/services/test_audio_service.py:806:16
ERROR Argument `BillingInfo` is not assignable to parameter `result` with type `dict[Unknown, Unknown]` in function `TestBillingServiceSubscriptionInfoDataType._assert_billing_info_types` [bad-argument-type]
- --> tests/unit_tests/services/test_billing_service.py:2076:41
+ --> tests/unit_tests/services/test_billing_service.py:2103:41
ERROR Argument `BillingInfo` is not assignable to parameter `result` with type `dict[Unknown, Unknown]` in function `TestBillingServiceSubscriptionInfoDataType._assert_billing_info_types` [bad-argument-type]
- --> tests/unit_tests/services/test_billing_service.py:2085:41
+ --> tests/unit_tests/services/test_billing_service.py:2112:41
ERROR Argument `BillingInfo` is not assignable to parameter `result` with type `dict[Unknown, Unknown]` in function `TestBillingServiceSubscriptionInfoDataType._assert_billing_info_types` [bad-argument-type]
- --> tests/unit_tests/services/test_billing_service.py:2098:41
+ --> tests/unit_tests/services/test_billing_service.py:2125:41
ERROR Argument `BillingInfo` is not assignable to parameter `result` with type `dict[Unknown, Unknown]` in function `TestBillingServiceSubscriptionInfoDataType._assert_billing_info_types` [bad-argument-type]
- --> tests/unit_tests/services/test_billing_service.py:2109:41
+ --> tests/unit_tests/services/test_billing_service.py:2136:41
ERROR Argument `FakeRepo` is not assignable to parameter `workflow_run_repo` with type `APIWorkflowRunRepository | None` in function `services.retention.workflow_run.clear_free_plan_expired_workflow_run_logs.WorkflowRunCleanup.__init__` [bad-argument-type]
--> tests/unit_tests/services/test_clear_free_plan_expired_workflow_run_logs.py:127:49
ERROR Class member `FailingRepo.delete_runs_with_related_by_ids` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
|
Contributor
Pyrefly Type Coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Fixes #<issue number>.Summary
part of #39993
blocked by #40772
after 40772 merged we should update the FeatureService part
Screenshots
Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint gods