Conversation
When importing __future__.annotations, class annotations are evaluated lazily, and dataclasses.Field.type becomes str instead of actual type. To access its accutual type, we patch the member. Ref: mivade#47
mivade
left a comment
There was a problem hiding this comment.
We'll want to somehow add tests for this.
|
@mivade
I agree with you. If you have good ideas, please let me know. |
|
As far as I checked[*1], I think test covers with and without annotations. What I don't understand is CI test. On my local machine with docker container ( I have no idea. [*1] [*2] |

When importing
__future__.annotations, class annotations are evaluated lazily, anddataclasses.Field.typebecomesstrinstead of actual type.To access its actual type, I patch the member.
Ref: #47
I tested with
tox -e .on Python:3.10 docker container.