Skip to content

Commit 1ccc25b

Browse files
committed
Tidy docstrings
Tidy docstrings
1 parent a0ef288 commit 1ccc25b

File tree

2 files changed

+42
-43
lines changed

2 files changed

+42
-43
lines changed

twitchio/client.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ async def wait_for(
295295
296296
Returns
297297
--------
298-
The arguments passed to the event.
298+
The arguments passed to the event.
299299
"""
300300
fut = self.loop.create_future()
301301
tup = (event, predicate, fut)
@@ -325,7 +325,7 @@ def get_channel(self, name: str) -> Optional[Channel]:
325325
326326
Returns
327327
--------
328-
:class:`.Channel`
328+
:class:`.Channel`
329329
"""
330330
name = name.lower()
331331

@@ -393,7 +393,7 @@ def create_user(self, user_id: int, user_name: str) -> PartialUser:
393393
394394
Returns
395395
--------
396-
:class:`twitchio.PartialUser`
396+
:class:`twitchio.PartialUser`
397397
"""
398398
return PartialUser(self._http, user_id, user_name)
399399

@@ -443,7 +443,7 @@ async def fetch_clips(self, ids: List[str]):
443443
444444
Returns
445445
--------
446-
List[:class:`twitchio.Clip`]
446+
List[:class:`twitchio.Clip`]
447447
"""
448448
data = await self._http.get_clips(ids=ids)
449449
return [models.Clip(self._http, d) for d in data]
@@ -465,7 +465,7 @@ async def fetch_channel(self, broadcaster: str, token: Optional[str] = None):
465465
466466
Returns
467467
--------
468-
:class:`twitchio.ChannelInfo`
468+
:class:`twitchio.ChannelInfo`
469469
"""
470470

471471
if not broadcaster.isdigit():
@@ -497,7 +497,7 @@ async def fetch_channels(self, broadcaster_ids: List[int], token: Optional[str]
497497
498498
Returns
499499
--------
500-
List[:class:`twitchio.ChannelInfo`]
500+
List[:class:`twitchio.ChannelInfo`]
501501
"""
502502
from .models import ChannelInfo
503503

@@ -541,7 +541,7 @@ async def fetch_videos(
541541
542542
Returns
543543
--------
544-
List[:class:`twitchio.Video`]
544+
List[:class:`twitchio.Video`]
545545
"""
546546
from .models import Video
547547

@@ -569,7 +569,7 @@ async def fetch_cheermotes(self, user_id: int = None):
569569
570570
Returns
571571
--------
572-
List[:class:`twitchio.CheerEmote`]
572+
List[:class:`twitchio.CheerEmote`]
573573
"""
574574
data = await self._http.get_cheermotes(str(user_id) if user_id else None)
575575
return [models.CheerEmote(self._http, x) for x in data]
@@ -581,7 +581,7 @@ async def fetch_global_emotes(self):
581581
582582
Returns
583583
--------
584-
List[:class:`twitchio.GlobalEmote`]
584+
List[:class:`twitchio.GlobalEmote`]
585585
"""
586586
from .models import GlobalEmote
587587

@@ -595,7 +595,7 @@ async def fetch_top_games(self) -> List[models.Game]:
595595
596596
Returns
597597
--------
598-
List[:class:`twitchio.Game`]
598+
List[:class:`twitchio.Game`]
599599
"""
600600
data = await self._http.get_top_games()
601601
return [models.Game(d) for d in data]
@@ -619,7 +619,7 @@ async def fetch_games(
619619
620620
Returns
621621
--------
622-
List[:class:`twitchio.Game`]
622+
List[:class:`twitchio.Game`]
623623
"""
624624

625625
data = await self._http.get_games(ids, names, igdb_ids)
@@ -637,7 +637,7 @@ async def fetch_tags(self, ids: Optional[List[str]] = None):
637637
638638
Returns
639639
--------
640-
List[:class:`twitchio.Tag`]
640+
List[:class:`twitchio.Tag`]
641641
"""
642642
data = await self._http.get_stream_tags(ids)
643643
return [models.Tag(x) for x in data]
@@ -725,7 +725,7 @@ async def search_categories(self, query: str):
725725
726726
Returns
727727
--------
728-
List[:class:`twitchio.Game`]
728+
List[:class:`twitchio.Game`]
729729
"""
730730
data = await self._http.get_search_categories(query)
731731
return [models.Game(x) for x in data]
@@ -744,7 +744,7 @@ async def search_channels(self, query: str, *, live_only=False):
744744
745745
Returns
746746
--------
747-
List[:class:`twitchio.SearchUser`]
747+
List[:class:`twitchio.SearchUser`]
748748
"""
749749
data = await self._http.get_search_channels(query, live=live_only)
750750
return [SearchUser(self._http, x) for x in data]
@@ -763,7 +763,7 @@ async def delete_videos(self, token: str, ids: List[int]) -> List[int]:
763763
764764
Returns
765765
--------
766-
List[:class:`int`]
766+
List[:class:`int`]
767767
"""
768768
resp = []
769769
for chunk in [ids[x : x + 3] for x in range(0, len(ids), 3)]:
@@ -785,7 +785,7 @@ async def fetch_chatters_colors(self, user_ids: List[int], token: Optional[str]
785785
786786
Returns
787787
--------
788-
List[:class:`twitchio.ChatterColor`]
788+
List[:class:`twitchio.ChatterColor`]
789789
"""
790790
data = await self._http.get_user_chat_color(user_ids, token)
791791
return [models.ChatterColor(self._http, x) for x in data]
@@ -807,7 +807,7 @@ async def update_chatter_color(self, token: str, user_id: int, color: str):
807807
808808
Returns
809809
--------
810-
None
810+
None
811811
"""
812812
await self._http.put_user_chat_color(token=token, user_id=str(user_id), color=color)
813813

@@ -818,7 +818,7 @@ async def get_webhook_subscriptions(self):
818818
819819
Returns
820820
--------
821-
List[:class:`twitchio.WebhookSubscription`]
821+
List[:class:`twitchio.WebhookSubscription`]
822822
"""
823823
data = await self._http.get_webhook_subs()
824824
return [models.WebhookSubscription(x) for x in data]

twitchio/user.py

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async def get_custom_rewards(
157157
----------
158158
token: :class:`str`
159159
The users oauth token.
160-
only_manageable : :class:`bool`
160+
only_manageable: :class:`bool`
161161
Whether to fetch all rewards or only ones you can manage. Defaults to false.
162162
ids: List[:class:`int`]
163163
An optional list of reward ids
@@ -368,8 +368,7 @@ async def fetch_hypetrain_events(self, id: str = None, token: str = None):
368368
369369
Returns
370370
--------
371-
List[:class:`twitchio.HypeTrainEvent`]
372-
A list of hypetrain events
371+
List[:class:`twitchio.HypeTrainEvent`]
373372
"""
374373
from .models import HypeTrainEvent
375374

@@ -407,7 +406,7 @@ async def fetch_ban_events(self, token: str, userids: List[int] = None):
407406
408407
Returns
409408
--------
410-
List[:class:`twitchio.BanEvent`]
409+
List[:class:`twitchio.BanEvent`]
411410
"""
412411
from .models import BanEvent
413412

@@ -428,7 +427,7 @@ async def fetch_moderators(self, token: str, userids: List[int] = None):
428427
429428
Returns
430429
--------
431-
List[:class:`twitchio.PartialUser`]
430+
List[:class:`twitchio.PartialUser`]
432431
"""
433432
data = await self._http.get_channel_moderators(token, str(self.id), user_ids=userids)
434433
return [PartialUser(self._http, d["user_id"], d["user_name"]) for d in data]
@@ -445,7 +444,7 @@ async def fetch_mod_events(self, token: str):
445444
446445
Returns
447446
--------
448-
List[:class:`twitchio.ModEvent`]
447+
List[:class:`twitchio.ModEvent`]
449448
"""
450449
from .models import ModEvent
451450

@@ -466,7 +465,7 @@ async def automod_check(self, token: str, query: list):
466465
467466
Returns
468467
--------
469-
List[:class:`twitchio.AutomodCheckResponse`]
468+
List[:class:`twitchio.AutomodCheckResponse`]
470469
"""
471470
from .models import AutomodCheckResponse
472471

@@ -485,7 +484,7 @@ async def fetch_stream_key(self, token: str):
485484
486485
Returns
487486
--------
488-
:class:`str`
487+
:class:`str`
489488
"""
490489
data = await self._http.get_stream_key(token, str(self.id))
491490
return data
@@ -502,7 +501,7 @@ async def fetch_following(self, token: Optional[str] = None) -> List["FollowEven
502501
503502
Returns
504503
--------
505-
List[:class:`twitchio.FollowEvent`]
504+
List[:class:`twitchio.FollowEvent`]
506505
"""
507506
from .models import FollowEvent
508507

@@ -521,7 +520,7 @@ async def fetch_followers(self, token: Optional[str] = None):
521520
522521
Returns
523522
--------
524-
List[:class:`twitchio.FollowEvent`]
523+
List[:class:`twitchio.FollowEvent`]
525524
"""
526525
from .models import FollowEvent
527526

@@ -541,7 +540,7 @@ async def fetch_follow(self, to_user: "PartialUser", token: Optional[str] = None
541540
542541
Returns
543542
--------
544-
:class:`twitchio.FollowEvent`
543+
:class:`twitchio.FollowEvent`
545544
"""
546545
if not isinstance(to_user, PartialUser):
547546
raise TypeError(f"to_user must be a PartialUser not {type(to_user)}")
@@ -562,7 +561,7 @@ async def fetch_follower_count(self, token: Optional[str] = None) -> int:
562561
563562
Returns
564563
--------
565-
:class:`int`
564+
:class:`int`
566565
"""
567566

568567
data = await self._http.get_follow_count(token=token, to_id=str(self.id))
@@ -580,7 +579,7 @@ async def fetch_following_count(self, token: Optional[str] = None) -> int:
580579
581580
Returns
582581
--------
583-
:class:`int`
582+
:class:`int`
584583
"""
585584
data = await self._http.get_follow_count(token=token, from_id=str(self.id))
586585
return data["total"]
@@ -592,7 +591,7 @@ async def fetch_channel_emotes(self):
592591
593592
Returns
594593
--------
595-
List[:class:`twitchio.ChannelEmote`]
594+
List[:class:`twitchio.ChannelEmote`]
596595
"""
597596
from .models import ChannelEmote
598597

@@ -645,7 +644,7 @@ async def fetch_subscriptions(self, token: str, userids: Optional[List[int]] = N
645644
646645
Returns
647646
--------
648-
List[:class:`twitchio.SubscriptionEvent`]
647+
List[:class:`twitchio.SubscriptionEvent`]
649648
"""
650649
from .models import SubscriptionEvent
651650

@@ -666,7 +665,7 @@ async def create_marker(self, token: str, description: str = None):
666665
667666
Returns
668667
--------
669-
:class:`twitchio.Marker`
668+
:class:`twitchio.Marker`
670669
"""
671670
from .models import Marker
672671

@@ -688,7 +687,7 @@ async def fetch_markers(self, token: str, video_id: str = None):
688687
689688
Returns
690689
--------
691-
Optional[:class:`twitchio.VideoMarkers`]
690+
Optional[:class:`twitchio.VideoMarkers`]
692691
"""
693692
from .models import VideoMarkers
694693

@@ -708,7 +707,7 @@ async def fetch_extensions(self, token: str):
708707
709708
Returns
710709
--------
711-
List[:class:`twitchio.Extension`]
710+
List[:class:`twitchio.Extension`]
712711
"""
713712
from .models import Extension
714713

@@ -728,7 +727,7 @@ async def fetch_active_extensions(self, token: str = None):
728727
729728
Returns
730729
--------
731-
Dict[:class:`str`, Dict[:class:`int`, :class:`twitchio.ActiveExtension`]]
730+
Dict[:class:`str`, Dict[:class:`int`, :class:`twitchio.ActiveExtension`]]
732731
"""
733732
from .models import ActiveExtension
734733

@@ -749,7 +748,7 @@ async def update_extensions(self, token: str, extensions: "ExtensionBuilder"):
749748
750749
Returns
751750
--------
752-
Dict[:class:`str`, Dict[:class:`int`, :class:`twitchio.ActiveExtension`]]
751+
Dict[:class:`str`, Dict[:class:`int`, :class:`twitchio.ActiveExtension`]]
753752
"""
754753
from .models import ActiveExtension
755754

@@ -774,7 +773,7 @@ async def fetch_videos(self, period="all", sort="time", type="all", language=Non
774773
775774
Returns
776775
--------
777-
List[:class:`twitchio.Video`]
776+
List[:class:`twitchio.Video`]
778777
"""
779778
from .models import Video
780779

@@ -804,7 +803,7 @@ async def end_prediction(
804803
805804
Returns
806805
--------
807-
:class:`twitchio.Prediction`
806+
:class:`twitchio.Prediction`
808807
"""
809808
from .models import Prediction
810809

@@ -832,7 +831,7 @@ async def get_predictions(self, token: str, prediction_id: str = None) -> List["
832831
833832
Returns
834833
--------
835-
:class:`twitchio.Prediction`
834+
:class:`twitchio.Prediction`
836835
"""
837836
from .models import Prediction
838837

@@ -861,7 +860,7 @@ async def create_prediction(
861860
862861
Returns
863862
--------
864-
:class:`twitchio.Prediction`
863+
:class:`twitchio.Prediction`
865864
"""
866865
from .models import Prediction
867866

@@ -924,7 +923,7 @@ async def fetch_schedule(
924923
925924
Returns
926925
--------
927-
:class:`twitchio.Schedule`
926+
:class:`twitchio.Schedule`
928927
"""
929928
from .models import Schedule
930929

0 commit comments

Comments
 (0)