Fixing ruff format

This commit is contained in:
Filipi Fuchter
2025-04-11 15:37:16 -03:00
parent 255666925b
commit 816b3a9545

View File

@@ -43,9 +43,11 @@ class TrackStatusMessage(BaseModel):
class RenegotiateMessage(BaseModel): class RenegotiateMessage(BaseModel):
type: Literal["renegotiate"] = "renegotiate" type: Literal["renegotiate"] = "renegotiate"
class PeerLeftMessage(BaseModel): class PeerLeftMessage(BaseModel):
type: Literal["peerLeft"] = "peerLeft" type: Literal["peerLeft"] = "peerLeft"
class SignallingMessage: class SignallingMessage:
Inbound = Union[TrackStatusMessage] # in case we need to add new messages in the future Inbound = Union[TrackStatusMessage] # in case we need to add new messages in the future
outbound = Union[RenegotiateMessage] outbound = Union[RenegotiateMessage]
@@ -274,9 +276,7 @@ class SmallWebRTCConnection(BaseObject):
logger.warning("Video transceiver not found. Cannot replace video track.") logger.warning("Video transceiver not found. Cannot replace video track.")
async def disconnect(self): async def disconnect(self):
self.send_app_message( self.send_app_message({"type": SIGNALLING_TYPE, "message": PeerLeftMessage().model_dump()})
{"type": SIGNALLING_TYPE, "message": PeerLeftMessage().model_dump()}
)
await self._close() await self._close()
async def _close(self): async def _close(self):