Force type conversion in python dataclass __init__ method : <p>I have the following very simple dataclass:</p>

<pre><code>import dataclasses

@dataclasses.dataclass
class Test:
    value: int
</code></pre>

<p>I create an instance of the class but instead of an integer I use a string:</p>

<pre><code>&gt;&gt;&gt; test = Test('1')
&gt;&gt;&gt; type(test.value)
&lt;class 'str'&gt;
</code></pre>

<p>What I actually want is a forced conversion to the datatype i defined in the class defintion:</p>

<pre><code>&gt;&gt;&gt; test = Test('1')
&gt;&gt;&gt; type(test.value)
&lt;class 'int'&gt;
</code></pre>

<p>Do I have to write the <code>__init__</code> method manually or is there a simple way to achieve this?</p>
