Skip to content

Commit

Permalink
fix ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
keepingitneil committed Mar 19, 2024
1 parent c0f038f commit bfff2ed
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 35 deletions.
5 changes: 2 additions & 3 deletions livekit-api/livekit/api/__init__.py
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
46 changes: 22 additions & 24 deletions livekit-rtc/livekit/rtc/__init__.py
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion livekit-rtc/livekit/rtc/resources/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
""" Used by importlib.resources and setuptools """
"""Used by importlib.resources and setuptools"""
15 changes: 8 additions & 7 deletions livekit-rtc/livekit/rtc/room.py
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit bfff2ed

Please sign in to comment.