Then this is more of an issue with type hints rather than dataclasses.
Interesting.
On Mon, Jan 4, 2021, at 16:01, Josue Balandrano Coronel wrote:
> Ah, very interesting.
>
> Just tried this and it worked. That's awesome, thanks!
>
> On Mon, Jan 4, 2021, at 15:45, Joao S. O. Bueno wrote:
> > I
Ah, very interesting.
Just tried this and it worked. That's awesome, thanks!
On Mon, Jan 4, 2021, at 15:45, Joao S. O. Bueno wrote:
> I think you are complicating things just because there is no easy way
> to tell mypy
> that although you are assigning a descriptor to a class variable
> in the c
I think you are complicating things just because there is no easy way to
tell mypy
that although you are assigning a descriptor to a class variable
in the class body, it will be used as a normal instance attribute
afterwards - and
it is the type used in the instance attribute that mypy should care