Cecil Curry
Cecil Curry
*...heh.* You're much too kind and generous for a trip to Mordor. Oh, very well! If you'd like to tour the hideous sights, I much recommend the `beartype._conf.confcls.BeartypeConf.__new__()` method as...
**Finally.** I couldn't stand my endless prevarication on dataclass validation even a second longer. Shockingly, therefore, I have done something. I've implemented a first-draft `@beartype`-driven validator for dataclass fields. The...
**Partially resolved by 67dd4cc430e77bc6e9.** @beartype now conditionally type-checks dataclass fields when *you* (read: the wondrous user) explicitly enable our newly introduced `BeartypeConf(is_check_pep557: bool = False)` configuration option. For safety, this...
**Great success!** @beartype now type-checks frozen dataclasses. We're incrementally getting there, bear bros: ```python from beartype import beartype, BeartypeConf from dataclasses import dataclass, InitVar from typing import ClassVar @beartype(conf=BeartypeConf(is_check_pep557=True)) #
**...heh.** I couldn't help myself. I've been cogitating over this today while I should have been doing other stuff, and... it's surprisingly trivial. Who knew, huh? I implemented a first-draft...
*...heh.* @wesselb [authored a *great* apropos comment here](https://github.com/beartype/beartype/discussions/402#discussioncomment-9952266): > @leycec, in the past Plum included a function `type_of`, but Plum has since been refactored to operate without needing a function...
> @leycec, in the past Plum included a function `type_of` :partying_face: > but Plum has since been refactored to operate without needing a function `type_of`. :sob: > turned out to...
**Gah!** GitHub ate my whole comment. Now we have to accept the scraps of an uninformative comment that isn't even funny. What a bad Caturday! :sob: To summarize my younger...
> I was thinking of the example where `x = 1` and `t = Literal[1]`. Then `is_bearable(x, t) == True`, but `infer_type(1) = int`, so `TypeHint(int) >> from beartype import...
> I hope you don't mean *maximally* wide as that would just return `Any` in every case. **...heh.** @iamrecursion spitting the hard truths as always. You're right, of course. I...