ruff fixes done

This commit is contained in:
ssillerom
2026-01-28 08:59:28 +01:00
parent 9102e81cb8
commit 55e0d4ecc4
2 changed files with 5 additions and 9 deletions

View File

@@ -30,6 +30,8 @@ from loguru import logger
from pydantic import BaseModel from pydantic import BaseModel
from pipecat.audio.dtmf.types import KeypadEntry from pipecat.audio.dtmf.types import KeypadEntry
from pipecat.audio.resamplers.soxr_stream_resampler import SOXRStreamAudioResampler
from pipecat.audio.utils import pcm_to_ulaw, ulaw_to_pcm
from pipecat.frames.frames import ( from pipecat.frames.frames import (
AudioRawFrame, AudioRawFrame,
CancelFrame, CancelFrame,
@@ -37,14 +39,12 @@ from pipecat.frames.frames import (
Frame, Frame,
InputAudioRawFrame, InputAudioRawFrame,
InputDTMFFrame, InputDTMFFrame,
InterruptionFrame,
OutputTransportMessageFrame, OutputTransportMessageFrame,
OutputTransportMessageUrgentFrame, OutputTransportMessageUrgentFrame,
StartFrame, StartFrame,
InterruptionFrame
) )
from pipecat.serializers.base_serializer import FrameSerializer from pipecat.serializers.base_serializer import FrameSerializer
from pipecat.audio.resamplers.soxr_stream_resampler import SOXRStreamAudioResampler
from pipecat.audio.utils import ulaw_to_pcm, pcm_to_ulaw
class AudioHookMessageType(str, Enum): class AudioHookMessageType(str, Enum):
@@ -832,7 +832,6 @@ class GenesysAudioHookSerializer(FrameSerializer):
Returns: Returns:
OutputTransportMessageUrgentFrame with pong response. OutputTransportMessageUrgentFrame with pong response.
""" """
logger.info(f"Sending pong response to Genesys...") logger.info(f"Sending pong response to Genesys...")
# Return as urgent frame to be sent through pipeline immediately # Return as urgent frame to be sent through pipeline immediately
return OutputTransportMessageUrgentFrame(message=self.create_pong_response()) return OutputTransportMessageUrgentFrame(message=self.create_pong_response())

View File

@@ -1,14 +1,11 @@
"""Tests for the Genesys AudioHook serializer.""" """Tests for the Genesys AudioHook serializer."""
import json import json
import pytest import pytest
from pipecat.frames.frames import InputDTMFFrame, OutputTransportMessageUrgentFrame from pipecat.frames.frames import InputDTMFFrame, OutputTransportMessageUrgentFrame
from pipecat.serializers.genesys import AudioHookChannel, GenesysAudioHookSerializer
from pipecat.serializers.genesys import (
GenesysAudioHookSerializer,
AudioHookChannel
)
class TestGenesysAudioHookSerializer: class TestGenesysAudioHookSerializer: