Update pydantic to 2.12#338
Conversation
(when including login credentials)
both for TypeAdapter- and BaseModel-based tests
sveinse
left a comment
There was a problem hiding this comment.
LGTM with a minor comment
| CHARGER_FIRMWARES = TypeAdapter(list[ChargerFirmware]) | ||
| CHARGER_STATES = TypeAdapter(list[ChargerState]) | ||
| CHARGER_UPDATES = TypeAdapter(dict[str, str]) | ||
| CONSTANTS = TypeAdapter(dict[str, Any]) |
There was a problem hiding this comment.
Why this change? Because of the lint recommendation that top-level variables are named in upper case, or something else?
There was a problem hiding this comment.
Given that it's now an instance instead of a class, PascalCase didn't seem right to me, and it also seemed like a good idea to have a visual distinction between the two in the URLS-map. I don't remember if ruff complained about this, really just a personal preference, and I probably won't be hard to convince if you prefer a different case.
There was a problem hiding this comment.
It's a good practice to do so, but the reasoning to why weren't immediately clear to me. I'm good as this is now.
Fixes #337