Is there any way to forbid changing types of mutated Pydantic models? For example,
from pydantic import BaseModel
class AppConfig(BaseModel):
class Config:
allow_mutation = True
a: int = 33
b: float = 22.0
I want to be able to change the fields, like:
config = AppConfig()
config.a = 44
But I want to forbid changing the fields' types, like:
config.a = '44'
<Some error message here>