Repository navigation
refactor: add missing return type hints to FeatureService methods - #46711
Merged
asukaminato0721 merged 1 commit intoNov 20, 2026
Merged
Conversation
Contributor
Pyrefly Type Coverage
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #46711 +/- ##
==========================================
+ Coverage 89.88% 90.12% +0.23%
==========================================
Files 6247 6365 +118
Lines 391170 403226 +12056
Branches 78443 79957 +1514
==========================================
+ Hits 351619 363422 +11803
+ Misses 33446 33403 -43
- Partials 6105 6401 +296
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 19, 2026
asukaminato0721
approved these changes
Nov 20, 2026
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.
Problem
Several methods in
api/services/feature_service.pywere missing return type hints, reducing type safety and code clarity:get_knowledge_rate_limit(cls, tenant_id: str)— no return type_fulfill_params_from_env(cls, features)— no return type_fulfill_params_from_workspace_info(cls, features, tenant_id)— no return type_fulfill_params_from_billing_api(cls, features, tenant_id, ...)— no return type_fulfill_vector_space_from_billing_info(cls, vector_space, billing_info)— no return typeSolution
Added return type hints to all five methods:
Testing
feature_entities.KnowledgeRateLimitModelis the correct return type by inspecting the method body_fulfill_*methods are void (mutate in-place, no return statement) so-> Noneis correctfeature_entitiesis already imported at the top of the file