cleaning up & pylint fixes

This commit is contained in:
SeaswimmerTheFsh 2023-07-01 10:03:51 -04:00
parent 2877627377
commit 6909900181
2 changed files with 4 additions and 4 deletions

View file

@ -19,7 +19,7 @@ jobs:
python -m pip install --upgrade pip
pip install pylint
pip install -U git+https://github.com/revoltchat/revolt.py
pip install python-dotenv mysql-connector-python pytimeparse2
pip install python-dotenv mysql-connector-python pytimeparse2 colorthief
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')

View file

@ -10,8 +10,8 @@ class Info(commands.Cog):
self.client = client
@staticmethod
def rgb_to_hex(r, g, b):
return '#{:02x}{:02x}{:02x}'.format(r, g, b)
def rgb_to_hex(r, g, b): # pylint: disable=invalid-name
return '#{:02x}{:02x}{:02x}'.format(r, g, b) # pylint: disable=consider-using-f-string
async def upload_to_revolt(self, ctx: commands.Context, asset: revolt.Asset, color: bool = False):
"""Uploads an asset to Revolt and returns the asset ID."""
@ -34,7 +34,7 @@ class Info(commands.Cog):
pass
@commands.command()
async def channelinfo(self, ctx: commands.Context, channel: commands.ChannelConverter, permissions: commands.BoolConverter = False):
async def channelinfo(self, ctx: commands.Context, channel: commands.ChannelConverter):
"""Displays information about a channel."""
if str(channel.channel_type) != "ChannelType.text_channel" and str(channel.channel_type) != "ChannelType.voice_channel":
raise self.CustomError