Conversation
Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>
✅ Deploy Preview for openfeature ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation for several SDKs, primarily refreshing the "Last updated" timestamps. Significant updates were made to the Go and Python documentation to correct API usage, import paths, and code snippets. In the Python documentation, a correction was suggested for the after method's type hints in the hook implementation example to avoid incorrect generic usage.
| from openfeature.flag_evaluation import FlagEvaluationDetails, FlagValueType | ||
|
|
||
| class MyHook(Hook): | ||
| def after(self, hook_context: HookContext, details: FlagEvaluationDetails, hints: dict): | ||
| def after(self, hook_context: HookContext, details: FlagEvaluationDetails[FlagValueType], hints: HookHints): |
There was a problem hiding this comment.
The type hint FlagEvaluationDetails[FlagValueType] is incorrect. FlagEvaluationDetails is a generic class where the type parameter represents the type of the flag value (e.g., bool, str, float, etc.), not the FlagValueType enum itself. Since this is a generic hook example, it's better to use FlagEvaluationDetails without a type argument (which defaults to Any) and remove the unused FlagValueType import.
from openfeature.flag_evaluation import FlagEvaluationDetails
class MyHook(Hook):
def after(self, hook_context: HookContext, details: FlagEvaluationDetails, hints: HookHints):
The PR was automatically generated via the update-sdk-docs GitHub workflow.