Skip to content

Make ValidationInfo generic #11485

Open
pydantic/pydantic-core
#1686
@Viicos

Description

@Viicos

Initial Checks

  • I have searched Google & GitHub for similar requests and couldn't find anything
  • I have read and followed the docs and still think this feature is missing

Description

Make ValidationInfo generic so that users can type hint the context attribute. This would be defined with a type var default to avoid static type checking breaking changes:

class ValidationInfo[Ctx = Any]:
    context: Ctx

Affected Components

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions