Unused argument 'ctx'
287 await logging_channel.send(embed=embed)
288
289 @staticmethod
290 async def prepare_rundown_embed(ctx: GIRContext, user):291 user_info = user_service.get_user(user.id)
292 rd = user_service.rundown(user.id)
293 rd_text = ""
Unused argument 'ctx'
215 await ctx.respond(embed=embed, view=view, ephemeral=ctx.whisper)
216
217 @staticmethod
218 async def do_firmware_response(ctx, matching_ios):219 embed = discord.Embed(
220 title=f"{matching_ios.get('osStr')} {matching_ios.get('version')}")
221 embed.add_field(name="Build number",
Unused argument 'arg'
513
514class AttachmentConverter(Converter):
515 @staticmethod
516 async def convert(ctx: Context, arg: str):517 try:
518 attach = ctx.message.attachments[0]
519 except IndexError:
Unused argument 'arg'
513
514class AttachmentConverter(Converter):
515 @staticmethod
516 async def convert(ctx: Context, arg: str):517 try:
518 attach = ctx.message.attachments[0]
519 except IndexError:
Description
An unused argument can lead to confusions. It should be removed. If this variable is necessary, name the variable _
or start the name with unused
or _unused
.
Bad practice
def square(x, y=1):
return x * x
class MySubClass(MyClass):
def __init__(self, number):
self.value = 42 # argument `number` remains unused
Preferred:
def square(x):
return x * x
class MySubClass(MyClass):
def __init__(self, _):
self.value = 42