forked from auracaster/bumble_mirror
Ruff: Add and fix UP rules
This commit is contained in:
@@ -22,9 +22,9 @@ import enum
|
||||
import logging
|
||||
import struct
|
||||
from collections.abc import AsyncGenerator, Awaitable, Callable
|
||||
from typing import Union
|
||||
from typing import ClassVar
|
||||
|
||||
from typing_extensions import ClassVar, Self
|
||||
from typing_extensions import Self
|
||||
|
||||
from bumble import utils
|
||||
from bumble.codecs import AacAudioRtpPacket
|
||||
@@ -266,7 +266,7 @@ class MediaCodecInformation:
|
||||
@classmethod
|
||||
def create(
|
||||
cls, media_codec_type: int, data: bytes
|
||||
) -> Union[MediaCodecInformation, bytes]:
|
||||
) -> MediaCodecInformation | bytes:
|
||||
if media_codec_type == CodecType.SBC:
|
||||
return SbcMediaCodecInformation.from_bytes(data)
|
||||
elif media_codec_type == CodecType.MPEG_2_4_AAC:
|
||||
@@ -686,7 +686,7 @@ class SbcPacketSource:
|
||||
# Prepare for next packets
|
||||
sequence_number += 1
|
||||
sequence_number &= 0xFFFF
|
||||
sample_count += sum((frame.sample_count for frame in frames))
|
||||
sample_count += sum(frame.sample_count for frame in frames)
|
||||
frames = [frame]
|
||||
frames_size = len(frame.payload)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user