refactor: add missing @override decorator to Moderation subclasses#36492
Merged
asukaminato0721 merged 1 commit intoMay 21, 2026
Merged
Conversation
Relates to langgenius#36406. Adds @OverRide to validate_config, moderation_for_inputs, and moderation_for_outputs in the three Moderation subclasses (ApiModeration, KeywordsModeration, OpenAIModeration). Uses 'from typing import override' (Python 3.12+ stdlib) per the pattern established in langgenius#36486.
Contributor
Pyrefly Type Coverage
|
This was referenced May 21, 2026
refactor: add missing @override decorator to file access controller and workflow file runtime
#36495
Merged
asukaminato0721
approved these changes
May 21, 2026
This was referenced May 22, 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.
Relates to #36406.
Adds
@override(PEP 698,from typing import override) to the three abstract methods (validate_config,moderation_for_inputs,moderation_for_outputs) in the threeModerationsubclasses (9 decorators total):ApiModeration(api/core/moderation/api/api.py)KeywordsModeration(api/core/moderation/keywords/keywords.py)OpenAIModeration(api/core/moderation/openai_moderation/openai_moderation.py)Pattern follows the merged example in #36425 and the previous slices in #36486, #36490, #36491.