From 7d8b959aabf97cdae6e2dd65dae20102c2affa10 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 10 Jan 2021 09:34:48 -0600 Subject: [PATCH] Improve formatting in Status and User methods --- tweepy/models.py | 48 ++++++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/tweepy/models.py b/tweepy/models.py index 2ced5c1..abe2344 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -186,29 +186,19 @@ class User(Model, Hashable): self.following = False def lists_memberships(self, *args, **kwargs): - return self._api.lists_memberships(user_id=self.id, - *args, - **kwargs) + return self._api.lists_memberships(user_id=self.id, *args, **kwargs) def lists_ownerships(self, *args, **kwargs): - return self._api.lists_ownerships(user_id=self.id, - *args, - **kwargs) + return self._api.lists_ownerships(user_id=self.id, *args, **kwargs) def lists_subscriptions(self, *args, **kwargs): - return self._api.lists_subscriptions(user_id=self.id, - *args, - **kwargs) + return self._api.lists_subscriptions(user_id=self.id, *args, **kwargs) def lists(self, *args, **kwargs): - return self._api.lists_all(user_id=self.id, - *args, - **kwargs) + return self._api.lists_all(user_id=self.id, *args, **kwargs) def followers_ids(self, *args, **kwargs): - return self._api.followers_ids(user_id=self.id, - *args, - **kwargs) + return self._api.followers_ids(user_id=self.id, *args, **kwargs) class DirectMessage(Model): @@ -326,9 +316,9 @@ class List(Model): return self._api.destroy_list(self.slug) def timeline(self, **kwargs): - return self._api.list_timeline(self.user.screen_name, - self.slug, - **kwargs) + return self._api.list_timeline( + self.user.screen_name, self.slug, **kwargs + ) def add_member(self, id): return self._api.add_list_member(self.slug, id) @@ -337,14 +327,12 @@ class List(Model): return self._api.remove_list_member(self.slug, id) def members(self, **kwargs): - return self._api.list_members(self.user.screen_name, - self.slug, - **kwargs) + return self._api.list_members( + self.user.screen_name, self.slug, **kwargs + ) def is_member(self, id): - return self._api.is_list_member(self.user.screen_name, - self.slug, - id) + return self._api.is_list_member(self.user.screen_name, self.slug, id) def subscribe(self): return self._api.subscribe_list(self.user.screen_name, self.slug) @@ -353,14 +341,14 @@ class List(Model): return self._api.unsubscribe_list(self.user.screen_name, self.slug) def subscribers(self, **kwargs): - return self._api.list_subscribers(self.user.screen_name, - self.slug, - **kwargs) + return self._api.list_subscribers( + self.user.screen_name, self.slug, **kwargs + ) def is_subscribed(self, id): - return self._api.is_subscribed_list(self.user.screen_name, - self.slug, - id) + return self._api.is_subscribed_list( + self.user.screen_name, self.slug, id + ) class Relation(Model): -- 2.25.1