-
Instead of directly accessing json, you could define a few helper dataclasses or pydantic models:
https://github.com/empa-scientific-it/cscs-keygen/blob/20b8c487deab801ab9d550ba91a00d7f9f06b99d/uti…
-
Take the example off the strawberry page:
```python
import strawberry
@strawberry.type
class User:
name: str
age: int
@strawberry.type
class Query:
@strawberry.field
de…
-
It would be nice to have a simpler, more straightforqward way to construct spec objects and set their attributes.
The current dynamic nature of the spec object attributes being completely defined i…
-
We use attrs internally in `tsinfer`. Should we switch to dataclasses, like in `tskit`?
-
### Describe the bug
When documentation for a class decorated with the `@dataclass` decorator is generated by autodoc, the typehints are written to the class constructor signature, even if `autodoc…
-
**Describe the bug**
State dataclasses with `Union` types fail to deserialize correctly.
**To Reproduce**
Create a state object with a Union type:
```
from typing import Union
@me.statec…
dltn updated
2 months ago
-
Hi Patrick, thanks for `equinox` -- it amazing as it is really easy to jump in without much prior knowledge.
I found some patters very clear, but harder to jump in without prior knowledge.
`equino…
-
# Feature or enhancement
I've noticed this comment yesterday:
https://github.com/python/cpython/blob/1fd603fad20187496619930e5b74aa7690425926/Lib/dataclasses.py#L1128-L1131
So, out of curiosit…
-
**Problem:** Task taking input of `dataclasses` object with `List[T]` will fail deserialization when the object definition is in postponed evaluation mode. The error is `ValueError: Only generic univa…
-
### Privileged issue
- [X] I'm @tiangolo or he asked me directly to create an issue here.
### Issue Content
The combination of using:
* Pydantic v2
* dataclasses (instead of Pydantic models)
*…