Skip to content

Commit bc6b655

Browse files
committed
Fix code style issues with Black
1 parent cd140d9 commit bc6b655

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

twitchio/ext/eventsub/models.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ class Headers:
7474
timestamp: :class:`datetime.datetime`
7575
The timestamp the message was sent at
7676
"""
77+
7778
def __init__(self, request: web.Request):
7879
self.message_id: str = request.headers["Twitch-Eventsub-Message-Id"]
7980
self.message_retry: int = int(request.headers["Twitch-Eventsub-Message-Retry"])
@@ -96,6 +97,7 @@ class BaseEvent:
9697
headers: :class`Headers`
9798
The headers received with the message
9899
"""
100+
99101
__slots__ = "_client", "_raw_data", "subscription", "headers"
100102

101103
def __init__(self, client: EventSubClient, data: str, request: web.Request):
@@ -134,6 +136,7 @@ class ChallengeEvent(BaseEvent):
134136
challenge: :class`str`
135137
The challenge received from twitch
136138
"""
139+
137140
__slots__ = ("challenge",)
138141

139142
def setup(self, data: dict):
@@ -160,6 +163,7 @@ class NotificationEvent(BaseEvent):
160163
data: :class:`models._DataType`
161164
The data associated with this event
162165
"""
166+
163167
__slots__ = ("data",)
164168

165169
def setup(self, _data: dict):
@@ -200,6 +204,7 @@ class ChannelBanData(EventData):
200204
permanent: :class:`bool`
201205
Whether the ban is permanent
202206
"""
207+
203208
__slots__ = "user", "broadcaster", "moderator", "reason", "ends_at", "permenant", "permanent"
204209

205210
def __init__(self, client: EventSubClient, data: dict):
@@ -209,7 +214,7 @@ def __init__(self, client: EventSubClient, data: dict):
209214
self.reason: str = data["reason"]
210215
self.ends_at: Optional[datetime.datetime] = data["ends_at"] and _parse_datetime(data["ends_at"])
211216
self.permenant: bool = data["is_permanent"]
212-
self.permanent = self.permenant # fix the spelling while keeping backwards compat
217+
self.permanent = self.permenant # fix the spelling while keeping backwards compat
213218

214219

215220
class ChannelSubscribeData(EventData):
@@ -227,6 +232,7 @@ class ChannelSubscribeData(EventData):
227232
is_gift: :class:`bool`
228233
Whether the subscription was a gift or not
229234
"""
235+
230236
__slots__ = "user", "broadcaster", "tier", "is_gift"
231237

232238
def __init__(self, client: EventSubClient, data: dict):
@@ -253,6 +259,7 @@ class ChannelCheerData(EventData):
253259
bits: :class:`int`
254260
The amount of bits sent
255261
"""
262+
256263
__slots__ = "user", "broadcaster", "is_anonymous", "message", "bits"
257264

258265
def __init__(self, client: EventSubClient, data: dict):
@@ -282,6 +289,7 @@ class ChannelUpdateData(EventData):
282289
is_mature: :class:`bool`
283290
Whether the channel is marked as mature by the broadcaster
284291
"""
292+
285293
__slots__ = "broadcaster", "title", "language", "category_id", "category_name", "is_mature"
286294

287295
def __init__(self, client: EventSubClient, data: dict):
@@ -306,6 +314,7 @@ class ChannelUnbanData(EventData):
306314
moderator: :class`PartialUser`
307315
The moderator that preformed the unban
308316
"""
317+
309318
__slots__ = "user", "broadcaster", "moderator"
310319

311320
def __init__(self, client: EventSubClient, data: dict):
@@ -327,6 +336,7 @@ class ChannelFollowData(EventData):
327336
followed_at: :class:`datetime.datetime`
328337
When the follow occurred
329338
"""
339+
330340
__slots__ = "user", "broadcaster", "followed_at"
331341

332342
def __init__(self, client: EventSubClient, data: dict):
@@ -348,6 +358,7 @@ class ChannelRaidData(EventData):
348358
viewer_count: :class:`int`
349359
The amount of people raiding
350360
"""
361+
351362
__slots__ = "raider", "reciever", "viewer_count"
352363

353364
def __init__(self, client: EventSubClient, data: dict):
@@ -367,6 +378,7 @@ class ChannelModeratorAddRemoveData(EventData):
367378
broadcaster: :class:`PartialUser`
368379
The channel that is having a moderator added/removed
369380
"""
381+
370382
__slots__ = "broadcaster", "user"
371383

372384
def __init__(self, client: EventSubClient, data: dict):
@@ -387,6 +399,7 @@ class CustomRewardAddUpdateRemoveData(EventData):
387399
reward: :class:`CustomReward`
388400
The reward object
389401
"""
402+
390403
__slots__ = "reward", "broadcaster", "id"
391404

392405
def __init__(self, client: EventSubClient, data: dict):
@@ -416,6 +429,7 @@ class CustomRewardRedemptionAddUpdateData(EventData):
416429
reward: :class:`CustomReward`
417430
The reward object
418431
"""
432+
419433
__slots__ = "broadcaster", "id", "user", "input", "status", "reward", "redeemed_at"
420434

421435
def __init__(self, client: EventSubClient, data: dict):
@@ -441,6 +455,7 @@ class HypeTrainContributor:
441455
total: :class:`int`
442456
How many points they've contributed to the Hype Train
443457
"""
458+
444459
__slots__ = "user", "type", "total"
445460

446461
def __init__(self, client: EventSubClient, data: dict):
@@ -471,6 +486,7 @@ class HypeTrainBeginProgressData(EventData):
471486
last_contribution: :class:`HypeTrainContributor`
472487
The last contributor to the Hype Train
473488
"""
489+
474490
__slots__ = (
475491
"broadcaster",
476492
"total_points",
@@ -512,6 +528,7 @@ class HypeTrainEndData(EventData):
512528
cooldown_ends_at: :class:`datetime.datetime`
513529
When another Hype Train can begin
514530
"""
531+
515532
__slots__ = "broadcaster", "level", "total_points", "top_contributions", "started", "ended", "cooldown_ends_at"
516533

517534
def __init__(self, client: EventSubClient, data: dict):
@@ -538,6 +555,7 @@ class StreamOnlineData(EventData):
538555
One of "live", "playlist", "watch_party", "premier", or "rerun". The type of live event.
539556
started_at: :class:`datetime.datetime`
540557
"""
558+
541559
__slots__ = "broadcaster", "id", "type", "started_at"
542560

543561
def __init__(self, client: EventSubClient, data: dict):
@@ -556,6 +574,7 @@ class StreamOfflineData(EventData):
556574
broadcaster: :class:`PartialUser`
557575
The channel that stopped streaming
558576
"""
577+
559578
__slots__ = ("broadcaster",)
560579

561580
def __init__(self, client: EventSubClient, data: dict):
@@ -573,6 +592,7 @@ class UserAuthorizationRevokedData(EventData):
573592
client_id: :class:`str`
574593
The client id of the app that had its authorization revoked
575594
"""
595+
576596
__slots__ = "client_id", "user"
577597

578598
def __init__(self, client: EventSubClient, data: dict):
@@ -593,6 +613,7 @@ class UserUpdateData(EventData):
593613
description: :class:`str`
594614
The channels description (displayed as ``bio``)
595615
"""
616+
596617
__slots__ = "user", "email", "description"
597618

598619
def __init__(self, client: EventSubClient, data: dict):

twitchio/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"Schedule",
6262
"ScheduleSegment",
6363
"ScheduleCategory",
64-
"ScheduleVacation"
64+
"ScheduleVacation",
6565
)
6666

6767

0 commit comments

Comments
 (0)