Skip to content

Commit

Permalink
explicitly state that we always return 'True'
Browse files Browse the repository at this point in the history
these are signal handlers and that's what we have to do,
hopefully this will help silence some linters
  • Loading branch information
totaam committed Jul 30, 2023
1 parent 3586fcc commit 9cc002e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xpra/audio/sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from time import monotonic
from collections import deque
from threading import Lock
from typing import Any
from typing import Any, Literal
from gi.repository import GObject # @UnresolvedImport

from xpra.audio.audio_pipeline import AudioPipeline
Expand Down Expand Up @@ -199,19 +199,19 @@ def adjust_volume(self) -> bool:
return True


def queue_pushing(self, *_args) -> bool:
def queue_pushing(self, *_args) -> Literal[True]:
gstlog("queue_pushing")
self.queue_state = "pushing"
self.emit_info()
return True

def queue_running(self, *_args) -> bool:
def queue_running(self, *_args) -> Literal[True]:
gstlog("queue_running")
self.queue_state = "running"
self.emit_info()
return True

def queue_underrun(self, *_args) -> bool:
def queue_underrun(self, *_args) -> Literal[True]:
now = monotonic()
if self.queue_state=="starting" or 1000*(now-self.start_time)<GRACE_PERIOD:
gstlog("ignoring underrun during startup")
Expand Down Expand Up @@ -242,7 +242,7 @@ def get_level_range(self, mintime=2, maxtime=10) -> int:
return maxl-minl
return 0

def queue_overrun(self, *_args) -> bool:
def queue_overrun(self, *_args) -> Literal[True]:
now = monotonic()
if self.queue_state=="starting" or 1000*(now-self.start_time)<GRACE_PERIOD:
gstlog("ignoring overrun during startup")
Expand Down

0 comments on commit 9cc002e

Please sign in to comment.