Skip to content

Commit 84cff3f

Browse files
committed
Run linter
1 parent 3fcf348 commit 84cff3f

File tree

5 files changed

+39
-49
lines changed

5 files changed

+39
-49
lines changed

livekit-api/livekit/api/egress_service.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def sync_start_room_composite_egress(
121121
self._auth_header(VideoGrants(room_record=True)),
122122
proto_egress.EgressInfo,
123123
)
124-
124+
125125
def sync_start_web_egress(
126126
self, start: proto_egress.WebEgressRequest
127127
) -> proto_egress.EgressInfo:
@@ -132,7 +132,7 @@ def sync_start_web_egress(
132132
self._auth_header(VideoGrants(room_record=True)),
133133
proto_egress.EgressInfo,
134134
)
135-
135+
136136
def sync_start_participant_egress(
137137
self, start: proto_egress.ParticipantEgressRequest
138138
) -> proto_egress.EgressInfo:
@@ -143,7 +143,7 @@ def sync_start_participant_egress(
143143
self._auth_header(VideoGrants(room_record=True)),
144144
proto_egress.EgressInfo,
145145
)
146-
146+
147147
def sync_start_track_composite_egress(
148148
self, start: proto_egress.TrackCompositeEgressRequest
149149
) -> proto_egress.EgressInfo:
@@ -154,7 +154,7 @@ def sync_start_track_composite_egress(
154154
self._auth_header(VideoGrants(room_record=True)),
155155
proto_egress.EgressInfo,
156156
)
157-
157+
158158
def sync_start_track_egress(
159159
self, start: proto_egress.TrackEgressRequest
160160
) -> proto_egress.EgressInfo:
@@ -165,7 +165,7 @@ def sync_start_track_egress(
165165
self._auth_header(VideoGrants(room_record=True)),
166166
proto_egress.EgressInfo,
167167
)
168-
168+
169169
def sync_update_layout(
170170
self, update: proto_egress.UpdateLayoutRequest
171171
) -> proto_egress.EgressInfo:
@@ -176,7 +176,7 @@ def sync_update_layout(
176176
self._auth_header(VideoGrants(room_record=True)),
177177
proto_egress.EgressInfo,
178178
)
179-
179+
180180
def sync_update_stream(
181181
self, update: proto_egress.UpdateStreamRequest
182182
) -> proto_egress.EgressInfo:
@@ -187,7 +187,7 @@ def sync_update_stream(
187187
self._auth_header(VideoGrants(room_record=True)),
188188
proto_egress.EgressInfo,
189189
)
190-
190+
191191
def sync_list_egress(
192192
self, list: proto_egress.ListEgressRequest
193193
) -> proto_egress.ListEgressResponse:
@@ -198,7 +198,7 @@ def sync_list_egress(
198198
self._auth_header(VideoGrants(room_record=True)),
199199
proto_egress.ListEgressResponse,
200200
)
201-
201+
202202
def sync_stop_egress(
203203
self, stop: proto_egress.StopEgressRequest
204204
) -> proto_egress.EgressInfo:
@@ -208,4 +208,4 @@ def sync_stop_egress(
208208
stop,
209209
self._auth_header(VideoGrants(room_record=True)),
210210
proto_egress.EgressInfo,
211-
)
211+
)

livekit-api/livekit/api/ingress_service.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,42 +56,34 @@ async def delete_ingress(
5656
proto_ingress.IngressInfo,
5757
)
5858

59-
def sync_create_ingress(
60-
self, create: proto_ingress.CreateIngressRequest
61-
):
59+
def sync_create_ingress(self, create: proto_ingress.CreateIngressRequest):
6260
return self._client.sync_request(
6361
SVC,
6462
"CreateIngress",
6563
create,
6664
self._auth_header(VideoGrants(ingress_admin=True)),
6765
proto_ingress.IngressInfo,
6866
)
69-
70-
def sync_update_ingress(
71-
self, update: proto_ingress.UpdateIngressRequest
72-
):
67+
68+
def sync_update_ingress(self, update: proto_ingress.UpdateIngressRequest):
7369
return self._client.sync_request(
7470
SVC,
7571
"UpdateIngress",
7672
update,
7773
self._auth_header(VideoGrants(ingress_admin=True)),
7874
proto_ingress.IngressInfo,
7975
)
80-
81-
def sync_list_ingress(
82-
self, list: proto_ingress.ListIngressRequest
83-
):
76+
77+
def sync_list_ingress(self, list: proto_ingress.ListIngressRequest):
8478
return self._client.sync_request(
8579
SVC,
8680
"ListIngress",
8781
list,
8882
self._auth_header(VideoGrants(ingress_admin=True)),
8983
proto_ingress.ListIngressResponse,
9084
)
91-
92-
def sync_delete_ingress(
93-
self, delete: proto_ingress.DeleteIngressRequest
94-
):
85+
86+
def sync_delete_ingress(self, delete: proto_ingress.DeleteIngressRequest):
9587
return self._client.sync_request(
9688
SVC,
9789
"DeleteIngress",

livekit-api/livekit/api/room_service.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def sync_create_room(
145145
self._auth_header(VideoGrants(room_create=True)),
146146
proto_models.Room,
147147
)
148-
148+
149149
def sync_delete_room(
150150
self, delete: proto_room.DeleteRoomRequest
151151
) -> proto_room.DeleteRoomResponse:
@@ -156,7 +156,7 @@ def sync_delete_room(
156156
self._auth_header(VideoGrants(room_create=True)),
157157
proto_room.DeleteRoomResponse,
158158
)
159-
159+
160160
def sync_update_room_metadata(
161161
self, update: proto_room.UpdateRoomMetadataRequest
162162
) -> proto_models.Room:
@@ -167,7 +167,7 @@ def sync_update_room_metadata(
167167
self._auth_header(VideoGrants(room_admin=True, room=update.room)),
168168
proto_models.Room,
169169
)
170-
170+
171171
def sync_remove_participant(
172172
self, remove: proto_room.RoomParticipantIdentity
173173
) -> proto_room.RemoveParticipantResponse:
@@ -178,7 +178,7 @@ def sync_remove_participant(
178178
self._auth_header(VideoGrants(room_admin=True, room=remove.room)),
179179
proto_room.RemoveParticipantResponse,
180180
)
181-
181+
182182
def sync_mute_published_track(
183183
self,
184184
update: proto_room.MuteRoomTrackRequest,
@@ -190,7 +190,7 @@ def sync_mute_published_track(
190190
self._auth_header(VideoGrants(room_admin=True, room=update.room)),
191191
proto_room.MuteRoomTrackResponse,
192192
)
193-
193+
194194
def sync_update_participant(
195195
self, update: proto_room.UpdateParticipantRequest
196196
) -> proto_models.ParticipantInfo:
@@ -201,7 +201,7 @@ def sync_update_participant(
201201
self._auth_header(VideoGrants(room_admin=True, room=update.room)),
202202
proto_models.ParticipantInfo,
203203
)
204-
204+
205205
def sync_update_subscriptions(
206206
self, update: proto_room.UpdateSubscriptionsRequest
207207
) -> proto_room.UpdateSubscriptionsResponse:
@@ -212,7 +212,7 @@ def sync_update_subscriptions(
212212
self._auth_header(VideoGrants(room_admin=True, room=update.room)),
213213
proto_room.UpdateSubscriptionsResponse,
214214
)
215-
215+
216216
def sync_send_data(
217217
self, send: proto_room.SendDataRequest
218218
) -> proto_room.SendDataResponse:
@@ -223,7 +223,7 @@ def sync_send_data(
223223
self._auth_header(VideoGrants(room_admin=True, room=send.room)),
224224
proto_room.SendDataResponse,
225225
)
226-
226+
227227
def sync_list_participants(
228228
self, list: proto_room.ListParticipantsRequest
229229
) -> proto_room.ListParticipantsResponse:
@@ -234,7 +234,7 @@ def sync_list_participants(
234234
self._auth_header(VideoGrants(room_admin=True, room=list.room)),
235235
proto_room.ListParticipantsResponse,
236236
)
237-
237+
238238
def sync_get_participant(
239239
self, get: proto_room.RoomParticipantIdentity
240240
) -> proto_models.ParticipantInfo:
@@ -245,7 +245,7 @@ def sync_get_participant(
245245
self._auth_header(VideoGrants(room_admin=True, room=get.room)),
246246
proto_models.ParticipantInfo,
247247
)
248-
248+
249249
def sync_list_rooms(
250250
self, list: proto_room.ListRoomsRequest
251251
) -> proto_room.ListRoomsResponse:

livekit-api/livekit/api/sip_service.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def sync_create_sip_trunk(
143143
self._auth_header(VideoGrants(), sip=SIPGrants(admin=True)),
144144
proto_sip.SIPTrunkInfo,
145145
)
146-
146+
147147
def sync_create_sip_inbound_trunk(
148148
self, create: proto_sip.CreateSIPInboundTrunkRequest
149149
) -> proto_sip.SIPInboundTrunkInfo:
@@ -154,7 +154,7 @@ def sync_create_sip_inbound_trunk(
154154
self._auth_header(VideoGrants(), sip=SIPGrants(admin=True)),
155155
proto_sip.SIPInboundTrunkInfo,
156156
)
157-
157+
158158
def sync_create_sip_outbound_trunk(
159159
self, create: proto_sip.CreateSIPOutboundTrunkRequest
160160
) -> proto_sip.SIPOutboundTrunkInfo:
@@ -165,7 +165,7 @@ def sync_create_sip_outbound_trunk(
165165
self._auth_header(VideoGrants(), sip=SIPGrants(admin=True)),
166166
proto_sip.SIPOutboundTrunkInfo,
167167
)
168-
168+
169169
def sync_list_sip_trunk(
170170
self, list: proto_sip.ListSIPTrunkRequest
171171
) -> proto_sip.ListSIPTrunkResponse:
@@ -176,7 +176,7 @@ def sync_list_sip_trunk(
176176
self._auth_header(VideoGrants(), sip=SIPGrants(admin=True)),
177177
proto_sip.ListSIPTrunkResponse,
178178
)
179-
179+
180180
def sync_list_sip_inbound_trunk(
181181
self, list: proto_sip.ListSIPInboundTrunkRequest
182182
) -> proto_sip.ListSIPInboundTrunkResponse:
@@ -187,7 +187,7 @@ def sync_list_sip_inbound_trunk(
187187
self._auth_header(VideoGrants(), sip=SIPGrants(admin=True)),
188188
proto_sip.ListSIPInboundTrunkResponse,
189189
)
190-
190+
191191
def sync_list_sip_outbound_trunk(
192192
self, list: proto_sip.ListSIPOutboundTrunkRequest
193193
) -> proto_sip.ListSIPOutboundTrunkResponse:
@@ -198,7 +198,7 @@ def sync_list_sip_outbound_trunk(
198198
self._auth_header(VideoGrants(), sip=SIPGrants(admin=True)),
199199
proto_sip.ListSIPOutboundTrunkResponse,
200200
)
201-
201+
202202
def sync_delete_sip_trunk(
203203
self, delete: proto_sip.DeleteSIPTrunkRequest
204204
) -> proto_sip.SIPTrunkInfo:
@@ -209,7 +209,7 @@ def sync_delete_sip_trunk(
209209
self._auth_header(VideoGrants(), sip=SIPGrants(admin=True)),
210210
proto_sip.SIPTrunkInfo,
211211
)
212-
212+
213213
def sync_create_sip_dispatch_rule(
214214
self, create: proto_sip.CreateSIPDispatchRuleRequest
215215
) -> proto_sip.SIPDispatchRuleInfo:
@@ -220,7 +220,7 @@ def sync_create_sip_dispatch_rule(
220220
self._auth_header(VideoGrants(), sip=SIPGrants(admin=True)),
221221
proto_sip.SIPDispatchRuleInfo,
222222
)
223-
223+
224224
def sync_list_sip_dispatch_rule(
225225
self, list: proto_sip.ListSIPDispatchRuleRequest
226226
) -> proto_sip.ListSIPDispatchRuleResponse:
@@ -231,7 +231,7 @@ def sync_list_sip_dispatch_rule(
231231
self._auth_header(VideoGrants(), sip=SIPGrants(admin=True)),
232232
proto_sip.ListSIPDispatchRuleResponse,
233233
)
234-
234+
235235
def sync_delete_sip_dispatch_rule(
236236
self, delete: proto_sip.DeleteSIPDispatchRuleRequest
237237
) -> proto_sip.SIPDispatchRuleInfo:
@@ -242,7 +242,7 @@ def sync_delete_sip_dispatch_rule(
242242
self._auth_header(VideoGrants(), sip=SIPGrants(admin=True)),
243243
proto_sip.SIPDispatchRuleInfo,
244244
)
245-
245+
246246
def sync_create_sip_participant(
247247
self, create: proto_sip.CreateSIPParticipantRequest
248248
) -> proto_sip.SIPParticipantInfo:

livekit-api/livekit/api/twirp_client.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async def request(
101101
# when we have an error, Twirp always encode it in json
102102
error_data = await resp.json()
103103
raise TwirpError(error_data["code"], error_data["msg"])
104-
104+
105105
def sync_request(
106106
self,
107107
service: str,
@@ -114,12 +114,10 @@ def sync_request(
114114
headers["Content-Type"] = "application/protobuf"
115115

116116
serialized_data = data.SerializeToString()
117-
resp = requests.post(
118-
url, headers=headers, data=serialized_data
119-
)
117+
resp = requests.post(url, headers=headers, data=serialized_data)
120118
if resp.status == 200:
121119
return response_class.FromString(resp.data())
122120
else:
123121
# when we have an error, Twirp always encode it in json
124122
error_data = resp.json()
125-
raise TwirpError(error_data["code"], error_data["msg"])
123+
raise TwirpError(error_data["code"], error_data["msg"])

0 commit comments

Comments
 (0)