From 7d593edd30d1d14cb367c5896333fa343fe3e6ea Mon Sep 17 00:00:00 2001 From: Lakshya Shastri Date: Thu, 1 Oct 2020 10:08:12 +0530 Subject: fixed issues showing up in Check for merge conflicts................................................Passed Check Toml...............................................................Passed Check Yaml...............................................................Passed Fix End of Files.........................................................Passed Mixed line ending........................................................Passed Trim Trailing Whitespace.................................................Passed check blanket noqa.......................................................Passed Flake8...................................................................Passed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot/exts/evergreen/githubinfo.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'bot/exts/evergreen/githubinfo.py') diff --git a/bot/exts/evergreen/githubinfo.py b/bot/exts/evergreen/githubinfo.py index e2541a23..46f6d167 100644 --- a/bot/exts/evergreen/githubinfo.py +++ b/bot/exts/evergreen/githubinfo.py @@ -1,7 +1,7 @@ import logging -import aiohttp from datetime import datetime +import aiohttp import discord from discord.ext import commands from discord.ext.commands.cooldowns import BucketType @@ -10,13 +10,13 @@ log = logging.getLogger(__name__) class GithubInfo(commands.Cog): + """Fetches GitHub.""" def __init__(self, bot: commands.Bot): self.bot = bot async def fetch_data(self, url: str) -> dict: - """Retrieve data as a dictionary""" - + """Retrieve data as a dictionary.""" async with aiohttp.ClientSession() as cs: async with cs.get(url) as r: return await r.json() @@ -24,13 +24,13 @@ class GithubInfo(commands.Cog): @commands.command(name='github', aliases=['gh']) @commands.cooldown(1, 5, BucketType.user) async def get_github_info(self, ctx: commands.Context, username: str = 'python-discord') -> None: - """Fetches a user's GitHub information + """ + Fetches a user's GitHub information. - User defaults to python-discord + User defaults to python-discord. Usage: .gh [username] """ - # fetch user data user_data = await self.fetch_data(f"https://api.github.com/users/{username}") @@ -84,5 +84,5 @@ class GithubInfo(commands.Cog): def setup(bot: commands.Bot) -> None: - """Adding the cog to the bot""" + """Adding the cog to the bot.""" bot.add_cog(GithubInfo(bot)) -- cgit v1.2.3