fix(api): use billing quota for credit pool#38132
Open
zyssyz123 wants to merge 5 commits into
Open
Conversation
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-06-29 02:36:26.665769076 +0000
+++ /tmp/pyrefly_pr.txt 2026-06-29 02:36:14.198609322 +0000
@@ -5906,14 +5906,20 @@
--> tests/unit_tests/services/test_async_workflow_service.py:322:22
ERROR Argument `None` is not assignable to parameter `file` with type `FileStorage` in function `services.audio_service.AudioService.transcript_asr` [bad-argument-type]
--> tests/unit_tests/services/test_audio_service.py:323:61
+ERROR Unexpected keyword argument `exclude_vector_space` in function `services.billing_service.BillingService.get_info` [unexpected-keyword]
+ --> tests/unit_tests/services/test_billing_service.py:353:53
+ERROR Unexpected keyword argument `exclude_vector_space` in function `services.billing_service.BillingService.get_info` [unexpected-keyword]
+ --> tests/unit_tests/services/test_billing_service.py:384:53
+ERROR Class `BillingService` has no class attribute `get_vector_space` [missing-attribute]
+ --> tests/unit_tests/services/test_billing_service.py:402:18
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:1771:41
+ --> tests/unit_tests/services/test_billing_service.py:1964: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:1780:41
+ --> tests/unit_tests/services/test_billing_service.py:1973: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:1791:41
+ --> tests/unit_tests/services/test_billing_service.py:1984: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:1802:41
+ --> tests/unit_tests/services/test_billing_service.py:1995: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:114:49
ERROR Class member `FixedDateTime.now` overrides parent class `datetime` in an inconsistent manner [bad-override]
@@ -5921,13 +5927,13 @@
ERROR Class member `FixedDateTime.now` overrides parent class `datetime` in an inconsistent manner [bad-override]
--> tests/unit_tests/services/test_clear_free_plan_tenant_expired_logs.py:478:13
ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
- --> tests/unit_tests/services/test_credit_pool_service.py:24:5
+ --> tests/unit_tests/services/test_credit_pool_service.py:26:5
ERROR Object of class `FromClause` has no attribute `insert` [missing-attribute]
- --> tests/unit_tests/services/test_credit_pool_service.py:29:13
+ --> tests/unit_tests/services/test_credit_pool_service.py:31:13
ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
- --> tests/unit_tests/services/test_credit_pool_service.py:94:5
+ --> tests/unit_tests/services/test_credit_pool_service.py:109:5
ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
- --> tests/unit_tests/services/test_credit_pool_service.py:146:5
+ --> tests/unit_tests/services/test_credit_pool_service.py:161:5
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.dataset_service.DatasetService.create_empty_dataset` [bad-argument-type]
--> tests/unit_tests/services/test_dataset_service_dataset.py:180:93
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.dataset_service.DatasetService.create_empty_dataset` [bad-argument-type]
|
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.
Summary
Notes
Direct push to
hotfix/1.14.2-fix.12is blocked by repository rules, so this PR targets the protected hotfix branch. Once merged, thehotfix/**build workflow should publishlanggenius/dify-api:hotfix-1.14.2-fix.12.Validation
api/.venv/bin/python -m py_compile api/services/billing_service.py api/services/credit_pool_service.py api/tests/unit_tests/services/test_billing_service.py api/tests/unit_tests/services/test_credit_pool_service.pyapi/.venv/bin/ruff check api/services/billing_service.py api/services/credit_pool_service.py api/tests/unit_tests/services/test_billing_service.py api/tests/unit_tests/services/test_credit_pool_service.py139in this local environment, same as the original PR validation path.