In PyCharm, the type hinting can support the standard library `dataclass` properly. However, when I use the same implement with mydataclass, the PyCharm can not support that:

```
from dataclasses import dataclass
from typing import Tuple, Dict, TypeVar

_C = TypeVar('_C', bound=type)

class TestORM(type):
    def __new__(cls, clsname: str, bases: Tuple, clsdict: Dict):
        param = ""
        for key, key_type in clsdict.get('__annotations__', {}).items():
            param += f", {key}: {key_type.__name__} = {clsdict.get(key)}"
        clsdict['__init__'] = make_init(param)
        return super().__new__(cls, clsname, bases, clsdict)

@dataclass
class Test:
    a: int = 0

def mydataclass(cls: _C) -> _C:
    param = ""
    for key, key_type in cls.__annotations__.items():
        param += f", {key}: {key_type.__name__} = {getattr(cls, key)}"
    setattr(cls, "__init__", make_init(param))
    return cls

def make_init(param:str):
    locals = {}
    txt = f'def __init__(self{param}):\n   pass'
    exec(txt, None, locals)
    return locals['__init__']

@mydataclass
class MyTest:
    a: int = 0

class MyORMTest(metaclass=TestORM):
    a: int = 0

if __name__ == '__main__':
    Test(a='a')
    MyTest(a='a')
    MyORMTest(a='a')

```

![The actual result in PyCharm](https://i.stack.imgur.com/y3537.png)

How would I do to make the PyCharm type hinting work?

To sum up, I just want to know how does PyCharm work with custom class with `dataclass` without any stub files which are with regard to the custom class. And when I use the same implement as `dataclass` with `exec` to make my `__init__` function dynamic, I still can not get the proper type hinting.

Does the PyCharm do some specific parse or check for the specific library?