Skip to content

Commit

Permalink
CYCLE.STY: fix some linter errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandohds564 committed May 29, 2024
1 parent a23edf9 commit dda2f55
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pyqt-apps/siriushla/as_ps_cycle/cycle_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ def keyPressEvent(self, evt):
super().keyPressEvent(evt)

def closeEvent(self, ev):
"""."""
self._update_setup_timer.stop()
super().closeEvent(ev)

Expand All @@ -715,23 +716,29 @@ def closeEvent(self, ev):


class MyProgressBar(QProgressBar):
"""."""

def __init__(self, parent=None):
"""."""
super().__init__(parent)
pal = self.palette()
self.default_color = pal.color(QPalette.Highlight)
self.warning_color = Qt.red

def increment(self):
"""."""
current_val = self.value()
max_val = self.maximum()
if max_val > current_val:
self.setValue(current_val + 1)


class UpdateProgressBar(QThread):
"""."""
increment = Signal()

def __init__(self, duration, parent=None):
"""."""
super().__init__(parent)
self._duration = duration
self._quit_task = False
Expand All @@ -741,6 +748,7 @@ def exit_task(self):
self._quit_task = True

def run(self):
"""."""
t0 = _time.time()
while _time.time() - t0 < self._duration:
if self._quit_task:
Expand Down

0 comments on commit dda2f55

Please sign in to comment.