def swapBrushStyles(self):
        """
        Swaps the BrushStyleButton to the next Brush Style.
        Called by pressing BrushStyleButton in panel.
        """
        styles = ["Square", "Round", "Diamond"]
        brushStyleIndex = styles.index(self.options["Style"]) + 1
        brushStyleIndex %= 3
        self.options["Style"] = styles[brushStyleIndex]
        self.setupPreview()

        Swaps the BrushStyleButton to the next Brush Style.
        Called by pressing BrushStyleButton in panel.
        
editortools/brush.py