Skip to content

Conversation

Copy link

Copilot AI commented Jan 3, 2026

Addressed bot feedback suggesting cls should be changed to self in Pydantic validators. After analysis, the current implementation is correct.

Analysis

Methods decorated with @unified_validator() use cls because:

  • The decorator wraps functions with Pydantic's root_validator (v1) or model_validator (v2)
  • Both are classmethod-style validators requiring cls as first parameter
  • All six validators in the file follow this pattern consistently (lines 94, 135, 146, 161, 198, 267)

Changing to self would break the validators. No code changes needed.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update CI, publish, and release workflows based on feedback Clarify validator parameter naming is correct Jan 3, 2026
Copilot AI requested a review from stuartp44 January 3, 2026 15:24
@stuartp44 stuartp44 closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants