docs: def assignAlignment(self, action):
          """
          Sets the current alignment for the editor.
          """
          if self._actions['align_left'] == action:
              self.setAlignment(Qt.AlignLeft)
          elif self._actions['align_right'] == action:
              self.setAlignment(Qt.AlignRight)
          elif self._actions['align_center'] == action:
              self.setAlignment(Qt.AlignHCenter)
          else:
              self.setAlignment(Qt.AlignJustify)