diff --git a/livekit-api/livekit/api/__init__.py b/livekit-api/livekit/api/__init__.py index 709a142e..f6a27b41 100644 --- a/livekit-api/livekit/api/__init__.py +++ b/livekit-api/livekit/api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 LiveKit, Inc. +# Copyright 2024 LiveKit, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""LiveKit API SDK -""" +"""LiveKit API SDK""" # flake8: noqa # re-export packages from protocol diff --git a/livekit-rtc/livekit/rtc/__init__.py b/livekit-rtc/livekit/rtc/__init__.py index 4a467570..bd4077ff 100644 --- a/livekit-rtc/livekit/rtc/__init__.py +++ b/livekit-rtc/livekit/rtc/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 LiveKit, Inc. +# Copyright 2024 LiveKit, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,58 +12,56 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""LiveKit RTC SDK -""" +"""LiveKit RTC SDK""" +from ._proto import stats_pb2 as stats +from ._proto.e2ee_pb2 import EncryptionState, EncryptionType from ._proto.room_pb2 import ( ConnectionQuality, ConnectionState, - DataPacketKind, - TrackPublishOptions, - IceTransportType, ContinualGatheringPolicy, + DataPacketKind, IceServer, + IceTransportType, + TrackPublishOptions, ) -from ._proto.e2ee_pb2 import EncryptionType, EncryptionState from ._proto.track_pb2 import StreamState, TrackKind, TrackSource from ._proto.video_frame_pb2 import VideoBufferType, VideoRotation -from ._proto import stats_pb2 as stats from .audio_frame import AudioFrame from .audio_source import AudioSource -from .audio_stream import AudioStream, AudioFrameEvent +from .audio_stream import AudioFrameEvent, AudioStream +from .chat import ChatManager, ChatMessage +from .e2ee import ( + E2EEManager, + E2EEOptions, + FrameCryptor, + KeyProvider, + KeyProviderOptions, +) from .participant import LocalParticipant, Participant, RemoteParticipant -from .room import ConnectError, Room, RoomOptions, RtcConfiguration, DataPacket +from .room import ConnectError, DataPacket, Room, RoomOptions, RtcConfiguration from .track import ( + AudioTrack, LocalAudioTrack, + LocalTrack, LocalVideoTrack, RemoteAudioTrack, + RemoteTrack, RemoteVideoTrack, Track, - LocalTrack, - RemoteTrack, - AudioTrack, VideoTrack, ) -from .e2ee import ( - E2EEManager, - E2EEOptions, - KeyProviderOptions, - KeyProvider, - FrameCryptor, -) from .track_publication import ( LocalTrackPublication, RemoteTrackPublication, TrackPublication, ) +from .version import __version__ from .video_frame import ( VideoFrame, ) from .video_source import VideoSource -from .video_stream import VideoStream, VideoFrameEvent -from .chat import ChatManager, ChatMessage - -from .version import __version__ +from .video_stream import VideoFrameEvent, VideoStream __all__ = [ "ConnectionQuality", diff --git a/livekit-rtc/livekit/rtc/resources/__init__.py b/livekit-rtc/livekit/rtc/resources/__init__.py index 806a592d..2133c643 100644 --- a/livekit-rtc/livekit/rtc/resources/__init__.py +++ b/livekit-rtc/livekit/rtc/resources/__init__.py @@ -1 +1 @@ -""" Used by importlib.resources and setuptools """ +"""Used by importlib.resources and setuptools""" diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index be9f8400..4d412554 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -1,4 +1,4 @@ -# Copyright 2023 LiveKit, Inc. +# Copyright 2024 LiveKit, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,15 +16,16 @@ import ctypes import logging from dataclasses import dataclass, field -from typing import Dict, Optional, Literal -from ._ffi_client import FfiHandle, FfiClient +from typing import Dict, Literal, Optional + +from ._event_emitter import EventEmitter +from ._ffi_client import FfiClient, FfiHandle from ._proto import ffi_pb2 as proto_ffi from ._proto import participant_pb2 as proto_participant from ._proto import room_pb2 as proto_room from ._proto.room_pb2 import ConnectionState from ._proto.track_pb2 import TrackKind from ._utils import BroadcastQueue -from ._event_emitter import EventEmitter from .e2ee import E2EEManager, E2EEOptions from .participant import LocalParticipant, Participant, RemoteParticipant from .track import RemoteAudioTrack, RemoteVideoTrack @@ -80,9 +81,9 @@ class RoomOptions: class DataPacket: data: bytes kind: proto_room.DataPacketKind.ValueType - participant: Optional[ - RemoteParticipant - ] = None # None when the data has been sent by a server SDK + participant: Optional[RemoteParticipant] = ( + None # None when the data has been sent by a server SDK + ) topic: Optional[str] = None