refactor(user_mute): remove unused reset() method from strategies
The reset() method on BaseUserMuteStrategy and its subclasses was never called anywhere in the codebase.
This commit is contained in:
@@ -18,10 +18,6 @@ class AlwaysUserMuteStrategy(BaseUserMuteStrategy):
|
||||
super().__init__()
|
||||
self._bot_speaking = False
|
||||
|
||||
async def reset(self):
|
||||
"""Reset the strategy to its initial state."""
|
||||
self._bot_speaking = False
|
||||
|
||||
async def process_frame(self, frame: Frame) -> bool:
|
||||
"""Process an incoming frame.
|
||||
|
||||
|
||||
@@ -51,10 +51,6 @@ class BaseUserMuteStrategy(BaseObject):
|
||||
"""Cleanup the strategy."""
|
||||
pass
|
||||
|
||||
async def reset(self):
|
||||
"""Reset the strategy to its initial state."""
|
||||
pass
|
||||
|
||||
async def process_frame(self, frame: Frame) -> bool:
|
||||
"""Process an incoming frame.
|
||||
|
||||
|
||||
@@ -29,11 +29,6 @@ class FirstSpeechUserMuteStrategy(BaseUserMuteStrategy):
|
||||
self._bot_speaking = False
|
||||
self._first_speech_handled = False
|
||||
|
||||
async def reset(self):
|
||||
"""Reset the strategy to its initial state."""
|
||||
self._bot_speaking = False
|
||||
self._first_speech_handled = False
|
||||
|
||||
async def process_frame(self, frame: Frame) -> bool:
|
||||
"""Process an incoming frame.
|
||||
|
||||
|
||||
@@ -30,10 +30,6 @@ class FunctionCallUserMuteStrategy(BaseUserMuteStrategy):
|
||||
super().__init__()
|
||||
self._function_call_in_progress: set[str] = set()
|
||||
|
||||
async def reset(self):
|
||||
"""Reset the strategy to its initial state."""
|
||||
self._function_call_in_progress = set()
|
||||
|
||||
async def process_frame(self, frame: Frame) -> bool:
|
||||
"""Process an incoming frame.
|
||||
|
||||
|
||||
@@ -30,10 +30,6 @@ class MuteUntilFirstBotCompleteUserMuteStrategy(BaseUserMuteStrategy):
|
||||
super().__init__()
|
||||
self._first_speech_handled = False
|
||||
|
||||
async def reset(self):
|
||||
"""Reset the strategy to its initial state."""
|
||||
self._first_speech_handled = False
|
||||
|
||||
async def process_frame(self, frame: Frame) -> bool:
|
||||
"""Process an incoming frame.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user