Tin Tvrtković
Tin Tvrtković
Yeah, I think it's only broken if you try to Literal it, and hopefully Mypy fixes that.
Another potential use case has to do with nested `evolve`s. Imagine if there was a special Attribute variant that supported this: ```python fields(Model).a.b.c ``` and produced an instance that could...
I'm pretty sure attrs can support this now, with no extra features. I'm willing to lend a hand to any author of a typechecking library to integrate into attrs.
This might be an interesting technical challenge. But how do we go about it operationally? - how to separate the eval code from the fallbacks? - how to test the...
> This doesn't seem hard to me; just set a flag and run all the same unit tests to ensure the behavior is the same. Ideally we could test using...
I don't see a direct use-case for this (since attrs classes should be statically known now) but I don't see the harm either.
It essentially makes `has` work at compile time too. Let's say your function takes a class (not an instance, but an actual class). You will type your argument as `type`...
Yes, the new evolve depends on an appropriate `__init__` on the class. To keep the explanation short, we believe evolve should construct a fresh instance, and that is generally properly...
Yeah I think so ;/
This sounds more like a problem for cattrs than attrs. I would just write a loading function manually that checks the dict for the old value and register it as...