Skip to content

fix(checks): rename LesserThan to LessThan with legacy aliases - #2580

Merged
mattbit merged 2 commits into
mainfrom
cursor/fix-less-than-naming-4db6
Jul 2, 2026
Merged

fix(checks): rename LesserThan to LessThan with legacy aliases#2580
mattbit merged 2 commits into
mainfrom
cursor/fix-less-than-naming-4db6

Conversation

@kevinmessiaen

Copy link
Copy Markdown
Member

Summary

Renames the grammatically incorrect comparison checks to use correct English:

  • LessThan / kind="less_than" (was LesserThan / lesser_than)
  • LessThanEquals / kind="less_than_equals" (was LesserThanEquals / lesser_than_equals)

LesserThan and LesserThanEquals remain as deprecated subclasses registered under the legacy kind strings so existing serialized checks continue to deserialize via Check.model_validate(). Instantiating the legacy classes emits a DeprecationWarning.

Test plan

  • make format && make check && make test-unit PACKAGE=giskard-checks
  • Added backward-compat tests for legacy kind serialization/deserialization
Open in Web Open in Cursor 
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>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread libs/giskard-checks/src/giskard/checks/builtin/comparison.py Outdated
Comment thread libs/giskard-checks/src/giskard/checks/builtin/comparison.py Outdated
@kevinmessiaen
kevinmessiaen marked this pull request as ready for review July 2, 2026 11:07
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@mattbit
mattbit merged commit 4204e1e into main Jul 2, 2026
46 checks passed
@mattbit
mattbit deleted the cursor/fix-less-than-naming-4db6 branch July 2, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants