muhammedfurkan / TelethonUserBot

Function with cyclomatic complexity higher than threshold PY-R1000
Anti-pattern
Minor
8 months ago8 months old
_ has a cyclomatic complexity of 16 with "high" risk
272
273
274@bot.on(admin_cmd(pattern="unrar"))
275async def _(event):276    if event.fwd_from:
277        return
278    mone = await event.edit("Processing ...")
_ has a cyclomatic complexity of 16 with "high" risk
168
169
170@bot.on(admin_cmd(pattern="untar"))
171async def _(event):172    if event.fwd_from:
173        return
174    mone = await event.edit("Processing ...")
_ has a cyclomatic complexity of 16 with "high" risk
 69
 70
 71@bot.on(admin_cmd(pattern="unzip"))
 72async def _(event): 73    if event.fwd_from:
 74        return
 75    mone = await event.edit("Processing ...")
download_video has a cyclomatic complexity of 25 with "high" risk
 32
 33
 34@bot.on(admin_cmd(pattern="playlist(a|v) (.*)"))
 35async def download_video(v_url): 36    """ For .ytdl command, download media from YouTube and many other sites. """
 37    url = v_url.pattern_match.group(2)
 38    type = v_url.pattern_match.group(1).lower()
download_video has a cyclomatic complexity of 27 with "very-high" risk
 91
 92
 93@bot.on(admin_cmd(pattern="yt(a|v) (.*)"))
 94async def download_video(v_url):  # sourcery skip: avoid-builtin-shadow 95    """ For .ytdl command, download media from YouTube and many other sites. """
 96    url = v_url.pattern_match.group(2)
 97    type = v_url.pattern_match.group(1).lower()