Can you annotate return type when value is instance of cls?
<p>Given a class with a helper method for initialization:</p>

<pre><code>class TrivialClass:
    def __init__(self, str_arg: str):
        self.string_attribute = str_arg

    @classmethod
    def from_int(cls, int_arg: int) -&gt; ?:
        str_arg = str(int_arg)
        return cls(str_arg)
</code></pre>

<p>Is it possible to annotate the return type of the <code>from_int</code> method?</p>

<p>I'v tried both <code>cls</code> and <code>TrivialClass</code> but PyCharm flags them as unresolved references which sounds reasonable at that point in time.</p>