fix(checks): rename LesserThan to LessThan with legacy aliases - #2580
Conversation
Replace grammatically incorrect LesserThan/LesserThanEquals with LessThan/LessThanEquals and kind strings less_than/less_than_equals. Keep deprecated LesserThan and LesserThanEquals subclasses registered under the legacy kind strings for serialization compatibility. Co-authored-by: Kevin Messiaen <kevinmessiaen@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request renames the comparison checks LesserThan and LesserThanEquals to LessThan and LessThanEquals respectively, while preserving the old names as deprecated aliases for backward compatibility. The feedback points out that using @model_validator(mode="after") to emit deprecation warnings results in inaccurate stack traces and unnecessary warning spam during deserialization. It is recommended to override the __init__ method instead to ensure warnings are only triggered during direct instantiation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Summary
Renames the grammatically incorrect comparison checks to use correct English:
LessThan/kind="less_than"(wasLesserThan/lesser_than)LessThanEquals/kind="less_than_equals"(wasLesserThanEquals/lesser_than_equals)LesserThanandLesserThanEqualsremain as deprecated subclasses registered under the legacy kind strings so existing serialized checks continue to deserialize viaCheck.model_validate(). Instantiating the legacy classes emits aDeprecationWarning.Test plan
make format && make check && make test-unit PACKAGE=giskard-checks