3 ms·
Haha, ChatGPT recommends this: from pydantic import BaseModel class MyModel(BaseModel): name: str def dict(self, *args, **kwargs): return sel
by jmogly 1y ago
Haha, ChatGPT recommends this:
from pydantic import BaseModel
class MyModel(BaseModel):
name: str
def dict(self, *args, **kwargs):
return self.model_dump(*args, **kwargs)
- gostsamo 1y agoYep, and when you are done migrating, you need to remove this, and there is pydantic3 coming. Keeping in mind the number of libraries nad microservices involved, search and replace was the easier option. PS: thank you, I can think on my own and even failing that, chat gpt is not in closed beta any more.