Skip to content

Code style & lint rules for Pydantic v2 #2484

@yaugenst-flex

Description

@yaugenst-flex

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.

Metadata

Metadata

Assignees

Labels

2.9will go into version 2.9.*

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions