Skip to content

Commit

Permalink
fix: codes were aligned with super-linter
Browse files Browse the repository at this point in the history
  • Loading branch information
scientiststwin committed Oct 20, 2023
1 parent 85843fd commit 3f8dea6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions bot/services/liked_tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

def get_liked_tweets(user_id: str) -> list[tweepy.Tweet]:
logging.info(
f"Start fetching `Tweets` that a user with ID {user_id} liked,
It might take long (because of twitter api limits)"
f"""Start fetching `Tweets` that a user with ID {user_id} liked,
It might take long (because of twitter api limits)"""
)
all_tweets: list[tweepy.Tweet] = []
next_token = None
Expand Down
4 changes: 2 additions & 2 deletions bot/services/quote_tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def get_quotes_of_tweet(tweet_id: str, since_id: str | None) -> list[tweepy.Twee
all Quote Tweets in last 7 days will be returned
"""
logging.info(
f"Start fetching `Quote Tweets` of a Tweet with ID {tweet_id} ,
It might take long (because of twitter api limits)"
f"""Start fetching `Quote Tweets` of a Tweet with ID {tweet_id},
It might take long (because of twitter api limits)"""
)
query = f"quotes_of_tweet_id:{tweet_id}"

Expand Down
6 changes: 4 additions & 2 deletions bot/services/reply_tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def get_all_replies_of_tweet(tweet_id: str, since_id: str | None) -> list[tweepy
all Reply Tweets in last 7 days will be returned
"""
logging.info(
f"Start fetching `Reply Tweets` of a Tweet with ID {tweet_id} , It might take long (because of twitter api limits)"
f"""Start fetching `Reply Tweets` of a Tweet with ID {tweet_id} ,
It might take long (because of twitter api limits)"""
)
query = f"conversation_id:{tweet_id}"

Expand Down Expand Up @@ -80,7 +81,8 @@ def get_first_depth_replies_of_tweet(
all Reply Tweets in last 7 days will be returned
"""
logging.info(
f"Start fetching `Reply Tweets (first-depth)` of a Tweet with ID {tweet_id} , It might take long (because of twitter api limits)"
f"""Start fetching `Reply Tweets (first-depth)` of a Tweet with ID {tweet_id},
It might take long (because of twitter api limits)"""
)
query = f"in_reply_to_tweet_id:{tweet_id}"

Expand Down
3 changes: 2 additions & 1 deletion bot/services/retweet_tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def get_retweets_of_tweet(tweet_id: str, since_id: str | None) -> list[tweepy.Tw
all Retweet Tweets in last 7 days will be returned
"""
logging.info(
f"Start fetching `Retweets` of a Tweet with ID {tweet_id} , It might take long (because of twitter api limits)"
f"""Start fetching `Retweets` of a Tweet with ID {tweet_id},
It might take long (because of twitter api limits)"""
)
query = f"retweets_of_tweet_id:{tweet_id}"

Expand Down
8 changes: 4 additions & 4 deletions bot/services/user_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def get_twitter_user(id=None, username=None) -> tweepy.User:
raise TypeError("Expected ID or username, not both")

logging.info(
f"Start fetching `ّUser` information of a User with ID {id} or USERNAME {username},
It might take long (because of twitter api limits)"
f"""Start fetching `ّUser` information of a User with ID {id} or USERNAME {username},
It might take long (because of twitter api limits)"""
)

user = retry_function_if_fail(
Expand All @@ -35,8 +35,8 @@ def get_twitter_users(ids=None, usernames=None) -> list[tweepy.User]:
raise TypeError("Expected IDs or usernames, not both")

logging.info(
f"Start fetching `ّUsers` information of Users with IDs {ids} or USERNAMEs {usernames},
It might take long (because of twitter api limits)"
f"""Start fetching `ّUsers` information of Users with IDs {ids} or USERNAMEs {usernames},
It might take long (because of twitter api limits)"""
)

ids = ",".join(ids) if ids else None
Expand Down
8 changes: 4 additions & 4 deletions bot/services/user_tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def get_user_tweets(user_handler: str, since_id: str | None) -> list[tweepy.Twee
all user's Tweets in last 7 days will be returned
"""
logging.info(
f"Start fetching `Tweets` of a User with ID/USERNAME {user_handler} ,
It might take long (because of twitter api limits)"
f"""Start fetching `Tweets` of a User with ID/USERNAME {user_handler},
It might take long (because of twitter api limits)"""
)
query = f"from:{user_handler}"

Expand Down Expand Up @@ -82,8 +82,8 @@ def get_mentioned_tweets_by_username(
all Tweets that user has mentioned in last 7 days will be returned
"""
logging.info(
f"Start fetching `Mentioned Tweets` of a User with USERNAME {username} ,
It might take long (because of twitter api limits)"
f"""Start fetching `Mentioned Tweets` of a User with USERNAME {username} ,
It might take long (because of twitter api limits)"""
)
query = f"@{username}"

Expand Down

0 comments on commit 3f8dea6

Please sign in to comment.