title: Why can python type checker / Pylance find annotations for @dataclass classes but not equivalent constructions?
body: <p>If I have:</p>
  <pre><code>@dataclass
  class Foo:
    a: int
    b: str
  </code></pre>
  <p>This code is recognized as valid and lint-free (I'm using pylance) - I get no pylance warnings, and proper documentation/autocomplete in my IDE for code like this:</p>
  <pre><code>f = Foo(a=1, b=&quot;2&quot;)
  </code></pre>
  <p>If I extend this to:</p>
  <pre><code>other_dataclass = dataclass
  
  @other_dataclass 
  class Foo:
    a: int
    n: str
  </code></pre>
  <p>I also have the same (correct) result. However, if I define a trivial <code>other_dataclass</code> as:</p>
  <pre><code>def other_dataclass(cls):
      return dataclass(cls)
  </code></pre>
  <p>... Then I get a <code>Expected no arguments to &quot;Foo&quot; constructor</code>, and it appears Python tooling can no longer find the annotations for my constructor. It's not specific to this construction - I worked backwards from a more complex wrapper around <code>dataclass</code> and tried several different &quot;trival&quot; ways to wrap <code>dataclass</code> - none of them preserved annotations in a way that any Python tooling could recognize.</p>
  <p>Are annotations ONLY available for <code>dataclass</code> in tools like Pylance because of a library-specific workaround or special case? Or, is there something I can do in my <code>other_dataclass</code> to ensure that the annotations generated by <code>dataclass</code> are preserved and visible to pylance and other tooling? Is this a pylance bug, or is there something more fundamentally undefined about this case, such that other tools would also miss this case?</p>