def __new__()

in azurefunctions-extensions-base/azurefunctions/extensions/base/utils.py [0:0]


    def __new__(mcs, name, bases, dct):
        """BuildDictMeta will apply to every binding.
        It will apply :meth:`add_to_dict` decorator to :meth:`__init__` of
        every binding class to collect list of params to include in building
        json dictionary which corresponds to function.json in legacy app.
        It will also apply :meth:`skip_none` to :meth:`get_dict_repr` to
        enable json dictionary generated for every binding has non-empty
        value fields. It is needed for enabling binding param optionality.
        """
        cls = super().__new__(mcs, name, bases, dct)
        setattr(cls, "__init__", cls.add_to_dict(getattr(cls, "__init__")))
        setattr(cls, "get_dict_repr", cls.skip_none(getattr(cls, "get_dict_repr")))
        return cls