Skip to main content

PydanticForbiddenQualifier

An error raised if a forbidden type qualifier is found in a type annotation.

Constructor

Signature

def PydanticForbiddenQualifier(
qualifier: Qualifier,
annotation: Any
) - > None

Parameters

NameTypeDescription
qualifierQualifierThe forbidden type qualifier encountered (e.g., 'required', 'read_only').
annotationAnyThe type annotation where the forbidden qualifier was found.

Signature

def PydanticForbiddenQualifier(
qualifier: Qualifier,
annotation: Any
) - > None

Parameters

NameTypeDescription
qualifierQualifierThe specific type qualifier (e.g., 'required', 'class_var') that is prohibited in the current context
annotationAnyThe type annotation object where the forbidden qualifier was detected, used to generate a descriptive error message