Currently we have a lot of different conventions for Pydantic validators throughout the codebase. With the v2 port, I'm standardizing most of these (things like ellipses in field names, use of Optional, keyword-only defaults etc.).
Since most of these are not detectable using ruff, I propose adding a set of semgrep rules to CI that will enforce these going forward to prevent regressions.
Currently we have a lot of different conventions for Pydantic validators throughout the codebase. With the v2 port, I'm standardizing most of these (things like ellipses in field names, use of
Optional, keyword-only defaults etc.).Since most of these are not detectable using ruff, I propose adding a set of semgrep rules to CI that will enforce these going forward to prevent regressions.