sample-app-aoai-chatGPT icon indicating copy to clipboard operation
sample-app-aoai-chatGPT copied to clipboard

fix pydantic warnings

Open mkruse83 opened this issue 8 months ago • 0 comments

Fixed two typos that would trigger "validator not returning self"-warning from pydantic. Also returning self where previously returning None, to be consistent.

Motivation and Context

Starting the backend can trigger "not returning self"-warning. See https://docs.pydantic.dev/2.9/concepts/validators/#model-validators

Even though pydantic dev-version does not trigger this warning anymore, the changes are removing typos and ensuring consistency.

Description

Changed two typos from "return Self" to "return self". Also added "return self" for one validator to be consistent.

Contribution Checklist

  • [ X ] I have built and tested the code locally and in a deployed app
  • [ X ] For frontend changes, I have pulled the latest code from main, built the frontend, and committed all static files.
  • [ X ] This is a change for all users of this app. No code or asset is specific to my use case or my organization.
  • [ X ] I didn't break any existing functionality :smile:

mkruse83 avatar Feb 16 '25 20:02 mkruse83