def __new__()

in src/pydolphinscheduler/models/meta.py [0:0]


    def __new__(mcs, name: str, bases: Tuple, attrs: Dict):
        """Create a new class."""
        if mcs._FUNC_INIT not in attrs:
            raise TypeError(
                "Class with mateclass %s must have %s method",
                (mcs.__name__, mcs._FUNC_INIT),
            )

        sig = signature(attrs.get(mcs._FUNC_INIT))
        param = [
            param.name
            for name, param in sig.parameters.items()
            if name != mcs._PARAM_SELF
        ]

        for attr_name, attr_value in attrs.items():
            if isinstance(attr_value, classmethod) and not attr_name.startswith("__"):
                attrs[attr_name] = mcs.j2p(attr_value, name, attrs, param)
        return super(ModelMeta, mcs).__new__(mcs, name, bases, attrs)