aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-03-04 17:47:54 -0800
committerGravatar MarkKoz <[email protected]>2020-03-04 18:58:51 -0800
commitbbe81ebe0c27ea65fec1170648976d4fcd8c3f3c (patch)
treefb58f0e2c1b5b472f5de3417875613596394c26c /bot
parentMerge pull request #361 from ks129/games-command (diff)
Update dependencies
The pipfile will need to be re-locked to add a dependency so may as well re-pin some dependencies to reflect the more recent versions that will be used. discord.py was pinned to a patch version instead of a minor version to be on the safe side. Notable updates: * discord.py -> 1.3.2 * flake8-annotation -> 2.0 * pre-commit -> 2.1
Diffstat (limited to 'bot')
-rw-r--r--bot/seasons/evergreen/snakes/snakes_cog.py4
-rw-r--r--bot/seasons/halloween/hacktoberstats.py12
-rw-r--r--bot/seasons/valentines/be_my_valentine.py6
3 files changed, 11 insertions, 11 deletions
diff --git a/bot/seasons/evergreen/snakes/snakes_cog.py b/bot/seasons/evergreen/snakes/snakes_cog.py
index 1ed38f86..09f5e250 100644
--- a/bot/seasons/evergreen/snakes/snakes_cog.py
+++ b/bot/seasons/evergreen/snakes/snakes_cog.py
@@ -617,8 +617,8 @@ class Snakes(Cog):
text_color=text_color,
bg_color=bg_color
)
- png_bytesIO = utils.frame_to_png_bytes(image_frame)
- file = File(png_bytesIO, filename='snek.png')
+ png_bytes = utils.frame_to_png_bytes(image_frame)
+ file = File(png_bytes, filename='snek.png')
await ctx.send(file=file)
@snakes_group.command(name='get')
diff --git a/bot/seasons/halloween/hacktoberstats.py b/bot/seasons/halloween/hacktoberstats.py
index b7b4122d..fbadb7cc 100644
--- a/bot/seasons/halloween/hacktoberstats.py
+++ b/bot/seasons/halloween/hacktoberstats.py
@@ -121,8 +121,8 @@ class HacktoberStats(commands.Cog):
"""
if self.link_json.exists():
logging.info(f"Loading linked GitHub accounts from '{self.link_json}'")
- with open(self.link_json, 'r') as fID:
- linked_accounts = json.load(fID)
+ with open(self.link_json, 'r') as file:
+ linked_accounts = json.load(file)
logging.info(f"Loaded {len(linked_accounts)} linked GitHub accounts from '{self.link_json}'")
return linked_accounts
@@ -143,8 +143,8 @@ class HacktoberStats(commands.Cog):
}
"""
logging.info(f"Saving linked_accounts to '{self.link_json}'")
- with open(self.link_json, 'w') as fID:
- json.dump(self.linked_accounts, fID, default=str)
+ with open(self.link_json, 'w') as file:
+ json.dump(self.linked_accounts, file, default=str)
logging.info(f"linked_accounts saved to '{self.link_json}'")
async def get_stats(self, ctx: commands.Context, github_username: str) -> None:
@@ -309,11 +309,11 @@ class HacktoberStats(commands.Cog):
n contribution(s) to [shortname](url)
...
"""
- baseURL = "https://www.github.com/"
+ base_url = "https://www.github.com/"
contributionstrs = []
for repo in stats['top5']:
n = repo[1]
- contributionstrs.append(f"{n} {HacktoberStats._contributionator(n)} to [{repo[0]}]({baseURL}{repo[0]})")
+ contributionstrs.append(f"{n} {HacktoberStats._contributionator(n)} to [{repo[0]}]({base_url}{repo[0]})")
return "\n".join(contributionstrs)
diff --git a/bot/seasons/valentines/be_my_valentine.py b/bot/seasons/valentines/be_my_valentine.py
index de97cb4e..ab8ea290 100644
--- a/bot/seasons/valentines/be_my_valentine.py
+++ b/bot/seasons/valentines/be_my_valentine.py
@@ -202,9 +202,9 @@ class BeMyValentine(commands.Cog):
@staticmethod
def random_emoji() -> Tuple[str, str]:
"""Return two random emoji from the module-defined constants."""
- EMOJI_1 = random.choice(HEART_EMOJIS)
- EMOJI_2 = random.choice(HEART_EMOJIS)
- return EMOJI_1, EMOJI_2
+ emoji_1 = random.choice(HEART_EMOJIS)
+ emoji_2 = random.choice(HEART_EMOJIS)
+ return emoji_1, emoji_2
def random_valentine(self) -> Tuple[str, str]:
"""Grabs a random poem or a compliment (any message)."""