cleaning up & pylint fixes
This commit is contained in:
parent
2877627377
commit
6909900181
2 changed files with 4 additions and 4 deletions
2
.github/workflows/pylint.yml
vendored
2
.github/workflows/pylint.yml
vendored
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue