

def __applyCustomFormat(self, unused):
    with Gaffer.UndoContext(self.getPlug().ancestor(Gaffer.ScriptNode)):
        with self.getContext():
            if (self.getPlug().getValue() == GafferImage.Format()):
                self.getPlug().setValue(GafferImage.FormatPlug.getDefaultFormat(self.getContext()))
        Gaffer.Metadata.registerPlugValue(unused.getPlug(), 'formatPlugValueWidget:mode', 'custom', persistent=False)

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferImageUI/FormatPlugValueWidget.py FormatPlugValueWidget.__applyCustomFormat/VarMisuse@93/132 `self`->`unused`