from wagtail import fields


class CoyoteStreamField(fields.StreamField):
    def deconstruct(self):
        name, path, _, kwargs = super().deconstruct()
        kwargs.pop("block_lookup")
        return (
            name,
            path,
            [
                (),
            ],
            kwargs,
        )

    def clone(self):
        """
        Uses super.deconstruct() to clone a new copy of this Field.
        Will not preserve any class attachments/attribute names.
        """
        _, __, args, kwargs = super().deconstruct()
        return self.__class__(*args, **kwargs)
