auth
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 3 0 convention setup Missing function or method docstring missing-function-docstring C0116
auth.__init__
Line Column Type Object Message Symbol Message Id
Source 4 0 convention Final newline missing missing-final-newline C0304
auth.auth
Line Column Type Object Message Symbol Message Id
Source 41 0 convention Line too long (112/100) line-too-long C0301
Source 151 0 convention Line too long (231/100) line-too-long C0301
Source 165 0 convention Unnecessary parens after 'not' keyword superfluous-parens C0325
Source 238 0 convention Line too long (253/100) line-too-long C0301
Source 251 0 convention Line too long (166/100) line-too-long C0301
Source 259 0 convention Line too long (253/100) line-too-long C0301
Source 465 0 convention Line too long (139/100) line-too-long C0301
Source 550 0 convention Line too long (106/100) line-too-long C0301
Source 633 0 convention Line too long (144/100) line-too-long C0301
Source 642 0 convention Line too long (148/100) line-too-long C0301
Source 686 0 convention Line too long (110/100) line-too-long C0301
Source 696 0 convention Line too long (107/100) line-too-long C0301
Source 755 0 convention Line too long (122/100) line-too-long C0301
Source 973 0 convention Line too long (310/100) line-too-long C0301
Source 1076 0 convention Line too long (392/100) line-too-long C0301
Source 1095 0 convention Line too long (109/100) line-too-long C0301
Source 1155 0 convention Line too long (253/100) line-too-long C0301
Source 1 0 convention Too many lines in module (1179/1000) too-many-lines C0302
Source 421 25 warning Anomalous backslash in string: '\s'. String constant might be missing an r prefix. anomalous-backslash-in-string W1401
Source 421 30 warning Anomalous backslash in string: '\d'. String constant might be missing an r prefix. anomalous-backslash-in-string W1401
Source 421 43 warning Anomalous backslash in string: '\s'. String constant might be missing an r prefix. anomalous-backslash-in-string W1401
Source 421 53 warning Anomalous backslash in string: '\s'. String constant might be missing an r prefix. anomalous-backslash-in-string W1401
Source 421 57 warning Anomalous backslash in string: '\d'. String constant might be missing an r prefix. anomalous-backslash-in-string W1401
Source 421 61 warning Anomalous backslash in string: '\s'. String constant might be missing an r prefix. anomalous-backslash-in-string W1401
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 5 0 error Unable to import 'recurrent.event_parser' import-error E0401
Source 9 0 warning Reimport 'asyncio' (imported line 1) reimported W0404
Source 31 0 warning Reimport 'parser' (imported line 6) reimported W0404
Source 97 8 warning Auth.initialize Unused variable 'owner' unused-variable W0612
Source 117 4 warning Auth.cog_unload Method 'cog_unload' was expected to be 'async', found it instead as 'non-async' invalid-overridden-method W0236
Source 121 12 warning Auth.cog_unload No exception type(s) specified bare-except W0702
Source 126 4 convention Auth.programme_notifier Missing function or method docstring missing-function-docstring C0116
Source 126 4 refactor Auth.programme_notifier Too many local variables (16/15) too-many-locals R0914
Source 134 19 warning Auth.programme_notifier Catching too general exception Exception broad-exception-caught W0718
Source 134 12 convention Auth.programme_notifier Variable name "authException" doesn't conform to snake_case naming style invalid-name C0103
Source 147 23 refactor Auth.programme_notifier Simplify chained comparison between the operands chained-comparison R1716
Source 149 24 convention Auth.programme_notifier Variable name "embedVar" doesn't conform to snake_case naming style invalid-name C0103
Source 156 37 warning Auth.programme_notifier Using an f-string that does not have any interpolated variables f-string-without-interpolation W1309
Source 134 12 warning Auth.programme_notifier Unused variable 'authException' unused-variable W0612
Source 161 4 convention Auth.birthday_notifier Missing function or method docstring missing-function-docstring C0116
Source 161 4 refactor Auth.birthday_notifier Too many local variables (17/15) too-many-locals R0914
Source 162 8 convention Auth.birthday_notifier Variable name "tz_UK" doesn't conform to snake_case naming style invalid-name C0103
Source 163 8 convention Auth.birthday_notifier Variable name "datetime_UK" doesn't conform to snake_case naming style invalid-name C0103
Source 170 19 warning Auth.birthday_notifier Catching too general exception Exception broad-exception-caught W0718
Source 170 12 convention Auth.birthday_notifier Variable name "authException" doesn't conform to snake_case naming style invalid-name C0103
Source 176 16 convention Auth.birthday_notifier Variable name "embedVar" doesn't conform to snake_case naming style invalid-name C0103
Source 177 60 warning Auth.birthday_notifier Using an f-string that does not have any interpolated variables f-string-without-interpolation W1309
Source 196 24 warning Auth.birthday_notifier No exception type(s) specified bare-except W0702
Source 170 12 warning Auth.birthday_notifier Unused variable 'authException' unused-variable W0612
Source 210 8 warning Auth.auth Unnecessary pass statement unnecessary-pass W0107
Source 235 8 warning Auth.login No exception type(s) specified bare-except W0702
Source 256 8 warning Auth.adminlogin No exception type(s) specified bare-except W0702
Source 266 4 convention Auth.sendLogin Method name "sendLogin" doesn't conform to snake_case naming style invalid-name C0103
Source 296 4 convention Auth.whoVerified Missing function or method docstring missing-function-docstring C0116
Source 296 4 convention Auth.whoVerified Method name "whoVerified" doesn't conform to snake_case naming style invalid-name C0103
Source 317 12 warning Auth.whoVerified No exception type(s) specified bare-except W0702
Source 302 12 warning Auth.whoVerified Unused variable 'sections' unused-variable W0612
Source 350 12 warning Auth.whois No exception type(s) specified bare-except W0702
Source 358 4 convention Auth.groupInfo Method name "groupInfo" doesn't conform to snake_case naming style invalid-name C0103
Source 374 4 refactor Auth.verify Too many arguments (6/5) too-many-arguments R0913
Source 403 4 convention Auth.on_error Missing function or method docstring missing-function-docstring C0116
Source 407 8 error Auth.on_error The raise statement is not inside an except clause misplaced-bare-raise E0704
Source 410 4 convention Auth.on_message Missing function or method docstring missing-function-docstring C0116
Source 410 31 warning Auth.on_message Redefining name 'message' from outer scope (line 2) redefined-outer-name W0621
Source 432 4 convention Auth.mute_voice_channel Missing function or method docstring missing-function-docstring C0116
Source 454 4 convention Auth.on_voice_state_update Missing function or method docstring missing-function-docstring C0116
Source 466 12 refactor Auth.on_voice_state_update Redefining argument with the local name 'member' redefined-argument-from-local R1704
Source 482 4 convention Auth.get_user_data Missing function or method docstring missing-function-docstring C0116
Source 488 4 convention Auth.verify_from_message Missing function or method docstring missing-function-docstring C0116
Source 488 4 refactor Auth.verify_from_message Too many arguments (7/5) too-many-arguments R0913
Source 488 4 refactor Auth.verify_from_message Too many local variables (21/15) too-many-locals R0914
Source 490 8 warning Auth.verify_from_message Redefining name 'message' from outer scope (line 2) redefined-outer-name W0621
Source 533 8 warning Auth.verify_from_message No exception type(s) specified bare-except W0702
Source 548 15 warning Auth.verify_from_message Catching too general exception Exception broad-exception-caught W0718
Source 616 12 warning Auth.verify_from_message No exception type(s) specified bare-except W0702
Source 635 15 warning Auth.verify_from_message Catching too general exception Exception broad-exception-caught W0718
Source 488 4 refactor Auth.verify_from_message Too many branches (24/12) too-many-branches R0912
Source 488 4 refactor Auth.verify_from_message Too many statements (95/50) too-many-statements R0915
Source 548 8 warning Auth.verify_from_message Unused variable 'auth_exception' unused-variable W0612
Source 682 8 warning Auth.revoke No exception type(s) specified bare-except W0702
Source 673 31 convention Auth.revoke Formatting a regular string which could be an f-string consider-using-f-string C0209
Source 703 4 convention Auth.setInviteChannel Method name "setInviteChannel" doesn't conform to snake_case naming style invalid-name C0103
Source 714 4 convention Auth.setWelcomeChannel Method name "setWelcomeChannel" doesn't conform to snake_case naming style invalid-name C0103
Source 725 4 convention Auth.setRoleSignupChannel Method name "setRoleSignupChannel" doesn't conform to snake_case naming style invalid-name C0103
Source 736 4 convention Auth.setRoleSignupMessage Method name "setRoleSignupMessage" doesn't conform to snake_case naming style invalid-name C0103
Source 745 4 convention Auth.setModChannel Method name "setModChannel" doesn't conform to snake_case naming style invalid-name C0103
Source 754 4 convention Auth.setRegistrationCompleteMessage Method name "setRegistrationCompleteMessage" doesn't conform to snake_case naming style invalid-name C0103
Source 754 0 warning Auth.setRegistrationCompleteMessage Redefining name 'message' from outer scope (line 2) redefined-outer-name W0621
Source 764 4 convention Auth.setVerifiedRole Method name "setVerifiedRole" doesn't conform to snake_case naming style invalid-name C0103
Source 776 4 convention Auth.setVoiceRole Method name "setVoiceRole" doesn't conform to snake_case naming style invalid-name C0103
Source 788 4 convention Auth.setModRole Method name "setModRole" doesn't conform to snake_case naming style invalid-name C0103
Source 800 4 convention Auth.setLink Method name "setLink" doesn't conform to snake_case naming style invalid-name C0103
Source 809 4 convention Auth.setSectionRole Method name "setSectionRole" doesn't conform to snake_case naming style invalid-name C0103
Source 813 8 warning Auth.setSectionRole No exception type(s) specified bare-except W0702
Source 826 4 convention Auth.clearSectionId Method name "clearSectionId" doesn't conform to snake_case naming style invalid-name C0103
Source 835 4 convention Auth.unsetSectionId Method name "unsetSectionId" doesn't conform to snake_case naming style invalid-name C0103
Source 843 4 convention Auth.setSectionId Method name "setSectionId" doesn't conform to snake_case naming style invalid-name C0103
Source 843 4 refactor Auth.setSectionId Too many arguments (6/5) too-many-arguments R0913
Source 862 4 convention Auth.setWelcomeMessage Method name "setWelcomeMessage" doesn't conform to snake_case naming style invalid-name C0103
Source 862 61 warning Auth.setWelcomeMessage Redefining name 'message' from outer scope (line 2) redefined-outer-name W0621
Source 873 4 convention Auth.setOSMCredentials Method name "setOSMCredentials" doesn't conform to snake_case naming style invalid-name C0103
Source 882 4 convention Auth.on_raw_reaction_add Missing function or method docstring missing-function-docstring C0116
Source 895 8 warning Auth.on_raw_reaction_add Redefining name 'message' from outer scope (line 2) redefined-outer-name W0621
Source 900 8 warning Auth.on_raw_reaction_add Redefining name 'emoji' from outer scope (line 11) redefined-outer-name W0621
Source 886 15 convention Auth.on_raw_reaction_add Consider changing "not str(payload.emoji) in ['📩', '❓']" to "str(payload.emoji) not in ['📩', '❓']" unnecessary-negation C0117
Source 910 4 convention Auth.createSection Method name "createSection" doesn't conform to snake_case naming style invalid-name C0103
Source 987 8 refactor Auth.create_section Unnecessary "else" after "return", remove the "else" and de-indent the code inside it no-else-return R1705
Source 1033 4 convention Auth.createInterest Method name "createInterest" doesn't conform to snake_case naming style invalid-name C0103
Source 1094 4 convention Auth.listSectionTypes Method name "listSectionTypes" doesn't conform to snake_case naming style invalid-name C0103
Source 1097 8 convention Auth.listSectionTypes Variable name "embedVar" doesn't conform to snake_case naming style invalid-name C0103
Source 1112 4 convention Auth.listSections Method name "listSections" doesn't conform to snake_case naming style invalid-name C0103
Source 1115 8 convention Auth.listSections Variable name "embedVar" doesn't conform to snake_case naming style invalid-name C0103
Source 1123 21 convention Auth.listSections Formatting a regular string which could be an f-string consider-using-f-string C0209
Source 1128 4 convention Auth.reactLogin Missing function or method docstring missing-function-docstring C0116
Source 1128 4 convention Auth.reactLogin Method name "reactLogin" doesn't conform to snake_case naming style invalid-name C0103
Source 1153 8 warning Auth.reactLogin No exception type(s) specified bare-except W0702
Source 1159 4 convention Auth.reactHelpLogin Missing function or method docstring missing-function-docstring C0116
Source 1159 4 convention Auth.reactHelpLogin Method name "reactHelpLogin" doesn't conform to snake_case naming style invalid-name C0103
Source 34 0 refactor Auth Too many public methods (45/20) too-many-public-methods R0904
Source 9 0 convention standard import "asyncio" should be placed before third party imports "apscheduler.job.Job", "dateutil.rrule.rrulestr", "recurrent.event_parser.RecurringEvent", "dateutil.rrule", "apscheduler.schedulers.asyncio.AsyncIOScheduler", "apscheduler.triggers.cron.CronTrigger" wrong-import-order C0411
Source 23 0 convention standard import "datetime.datetime" should be placed before third party imports "apscheduler.job.Job", "dateutil.rrule.rrulestr", "recurrent.event_parser.RecurringEvent" (...) "redbot.core.commands", "redbot.cogs.admin", "redbot.core.commands.context.Context" and local imports "lib.openMenu.menu", "lib.osm.osm" wrong-import-order C0411
Source 24 0 convention standard import "base64" should be placed before third party imports "apscheduler.job.Job", "dateutil.rrule.rrulestr", "recurrent.event_parser.RecurringEvent" (...) "redbot.core.commands", "redbot.cogs.admin", "redbot.core.commands.context.Context" and local imports "lib.openMenu.menu", "lib.osm.osm" wrong-import-order C0411
Source 25 0 convention third party import "discord" should be placed before local imports "lib.openMenu.menu", "lib.osm.osm" wrong-import-order C0411
Source 26 0 convention third party import "discord.ext.commands.Bot" should be placed before local imports "lib.openMenu.menu", "lib.osm.osm" wrong-import-order C0411
Source 27 0 convention standard import "re" should be placed before third party imports "apscheduler.job.Job", "dateutil.rrule.rrulestr", "recurrent.event_parser.RecurringEvent" (...) "redbot.core.commands.context.Context", "discord", "discord.ext.commands.Bot" and local imports "lib.openMenu.menu", "lib.osm.osm" wrong-import-order C0411
Source 28 0 convention third party import "sentry_sdk" should be placed before local imports "lib.openMenu.menu", "lib.osm.osm" wrong-import-order C0411
Source 29 0 convention standard import "typing.Dict" should be placed before third party imports "apscheduler.job.Job", "dateutil.rrule.rrulestr", "recurrent.event_parser.RecurringEvent" (...) "discord", "discord.ext.commands.Bot", "sentry_sdk" and local imports "lib.openMenu.menu", "lib.osm.osm" wrong-import-order C0411
Source 30 0 convention standard import "json" should be placed before third party imports "apscheduler.job.Job", "dateutil.rrule.rrulestr", "recurrent.event_parser.RecurringEvent" (...) "discord", "discord.ext.commands.Bot", "sentry_sdk" and local imports "lib.openMenu.menu", "lib.osm.osm" wrong-import-order C0411
Source 31 0 convention third party import "dateutil.parser" should be placed before local imports "lib.openMenu.menu", "lib.osm.osm" wrong-import-order C0411
Source 9 0 convention Imports from package asyncio are not grouped ungrouped-imports C0412
Source 6 0 convention Imports from package dateutil are not grouped ungrouped-imports C0412
Source 7 0 convention Imports from package apscheduler are not grouped ungrouped-imports C0412
Source 31 0 convention Imports from package dateutil are not grouped ungrouped-imports C0412
Source 4 0 warning Unused rrulestr imported from dateutil.rrule unused-import W0611
Source 5 0 warning Unused RecurringEvent imported from recurrent.event_parser unused-import W0611
Source 6 0 warning Unused rrule imported from dateutil unused-import W0611
Source 6 0 warning Unused parser imported from dateutil unused-import W0611
Source 8 0 warning Unused CronTrigger imported from apscheduler.triggers.cron unused-import W0611
Source 11 0 warning Unused reaction imported from discord unused-import W0611
Source 11 0 warning Unused emoji imported from discord unused-import W0611
Source 13 0 warning Unused Cog imported from discord.ext.commands.cog unused-import W0611
Source 14 0 warning Unused Command imported from discord.ext.commands.core unused-import W0611
Source 19 0 warning Unused admin imported from redbot.cogs unused-import W0611
Source 20 0 warning Unused Context imported from redbot.core.commands.context unused-import W0611
Source 21 0 warning Unused menu imported from lib.openMenu unused-import W0611
autoMusic
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 1 0 convention Module name "autoMusic" doesn't conform to snake_case naming style invalid-name C0103
Source 3 0 convention setup Missing function or method docstring missing-function-docstring C0116
autoMusic.__init__
Line Column Type Object Message Symbol Message Id
Source 4 0 convention Final newline missing missing-final-newline C0304
autoMusic.automusic
Line Column Type Object Message Symbol Message Id
Source 13 0 convention Line too long (173/100) line-too-long C0301
Source 35 0 convention Line too long (131/100) line-too-long C0301
Source 37 0 convention Trailing whitespace trailing-whitespace C0303
Source 44 0 convention Trailing whitespace trailing-whitespace C0303
Source 51 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 55 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 26 4 convention AutoMusic.audioChannel Method name "audioChannel" doesn't conform to snake_case naming style invalid-name C0103
Source 28 8 warning AutoMusic.audioChannel Unnecessary pass statement unnecessary-pass W0107
Source 36 8 warning AutoMusic.set Unnecessary pass statement unnecessary-pass W0107
Source 43 8 warning AutoMusic.clear Unnecessary pass statement unnecessary-pass W0107
Source 46 4 convention AutoMusic.on_message_without_command Missing function or method docstring missing-function-docstring C0116
Source 7 0 convention standard import "copy.copy" should be placed before third party imports "discord.ext.commands.bot.Bot", "discord.TextChannel", "redbot.core.commands", "redbot.cogs.audio.Audio", "redbot.core.commands.context.Context", "redbot.core.config.Config" wrong-import-order C0411
Source 4 0 warning Unused Audio imported from redbot.cogs.audio unused-import W0611
Source 8 0 warning Unused Alias imported from redbot.cogs.alias unused-import W0611
auto_rank.auto_rank
Line Column Type Object Message Symbol Message Id
Source 86 0 convention Line too long (112/100) line-too-long C0301
Source 568 0 convention Line too long (128/100) line-too-long C0301
Source 585 0 convention Line too long (142/100) line-too-long C0301
Source 607 0 convention Line too long (143/100) line-too-long C0301
auto_react.autoreact
Line Column Type Object Message Symbol Message Id
Source 29 0 convention Line too long (112/100) line-too-long C0301
auto_update.auto_update
Line Column Type Object Message Symbol Message Id
Source 38 0 convention Line too long (112/100) line-too-long C0301
Source 141 16 warning AutoUpdate._poll_repos Access to a protected member _update_available_modules of a client class protected-access W0212
Source 22 0 convention standard import "traceback" should be placed before third party imports "discord", "sentry_sdk", "apscheduler.job.Job" (...) "redbot.cogs.downloader.installable.InstalledModule", "redbot.core.Config", "redbot.core.utils.menus" wrong-import-order C0411
automute.automute
Line Column Type Object Message Symbol Message Id
Source 23 0 convention Line too long (112/100) line-too-long C0301
channelReminder
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 1 0 convention Module name "channelReminder" doesn't conform to snake_case naming style invalid-name C0103
Source 3 0 convention setup Missing function or method docstring missing-function-docstring C0116
channelReminder.__init__
Line Column Type Object Message Symbol Message Id
Source 4 0 convention Final newline missing missing-final-newline C0304
channelReminder.channel_reminder
Line Column Type Object Message Symbol Message Id
Source 32 0 convention Line too long (112/100) line-too-long C0301
Source 48 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 56 0 convention Line too long (161/100) line-too-long C0301
Source 61 0 convention Line too long (109/100) line-too-long C0301
Source 82 0 convention Line too long (119/100) line-too-long C0301
Source 89 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 99 0 convention Line too long (178/100) line-too-long C0301
Source 107 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 109 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 113 0 convention Line too long (110/100) line-too-long C0301
Source 121 0 convention Line too long (112/100) line-too-long C0301
Source 122 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 138 0 convention Line too long (102/100) line-too-long C0301
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 16 0 error Unable to import 'recurrent.event_parser' import-error E0401
Source 50 24 warning ChannelReminder.initialize Redefining built-in 'next' redefined-builtin W0622
Source 60 23 warning ChannelReminder.initialize Catching too general exception Exception broad-exception-caught W0718
Source 59 30 convention ChannelReminder.initialize Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 62 26 convention ChannelReminder.initialize Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 64 4 warning ChannelReminder.cog_unload Method 'cog_unload' was expected to be 'async', found it instead as 'non-async' invalid-overridden-method W0236
Source 68 12 warning ChannelReminder.cog_unload No exception type(s) specified bare-except W0702
Source 77 8 warning ChannelReminder.reminder Unnecessary pass statement unnecessary-pass W0107
Source 84 8 warning ChannelReminder.create Redefining name 'message' from outer scope (line 6) redefined-outer-name W0621
Source 92 12 warning ChannelReminder.create Redefining built-in 'next' redefined-builtin W0622
Source 96 8 warning ChannelReminder.create Redefining built-in 'id' redefined-builtin W0622
Source 99 14 convention ChannelReminder.create Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 122 17 convention ChannelReminder.delete Unnecessarily calls dunder method __call__. Invoke instance directly. unnecessary-dunder-call C2801
Source 122 17 convention ChannelReminder.delete Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 124 18 convention ChannelReminder.delete Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 131 4 convention ChannelReminder.send_reminder Missing function or method docstring missing-function-docstring C0116
Source 131 34 warning ChannelReminder.send_reminder Redefining built-in 'id' redefined-builtin W0622
Source 131 47 warning ChannelReminder.send_reminder Redefining name 'message' from outer scope (line 6) redefined-outer-name W0621
Source 135 12 warning ChannelReminder.send_reminder Redefining built-in 'next' redefined-builtin W0622
Source 141 15 warning ChannelReminder.send_reminder Catching too general exception Exception broad-exception-caught W0718
Source 140 22 convention ChannelReminder.send_reminder Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 144 12 warning ChannelReminder.send_reminder No exception type(s) specified bare-except W0702
Source 146 18 convention ChannelReminder.send_reminder Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 15 0 convention third party import "discord" should be placed before local import "lib.openMenu.menu" wrong-import-order C0411
Source 16 0 convention third party import "recurrent.event_parser.RecurringEvent" should be placed before local import "lib.openMenu.menu" wrong-import-order C0411
Source 17 0 convention standard import "datetime" should be placed before third party imports "apscheduler.job.Job", "dateutil.rrule.rrulestr", "discord.message" (...) "redbot.core.bot.Red", "discord", "recurrent.event_parser.RecurringEvent" and local import "lib.openMenu.menu" wrong-import-order C0411
Source 18 0 convention third party import "dateutil.rrule" should be placed before local import "lib.openMenu.menu" wrong-import-order C0411
Source 19 0 convention third party import "apscheduler.schedulers.asyncio.AsyncIOScheduler" should be placed before local import "lib.openMenu.menu" wrong-import-order C0411
Source 20 0 convention standard import "uuid" should be placed before third party imports "apscheduler.job.Job", "dateutil.rrule.rrulestr", "discord.message" (...) "recurrent.event_parser.RecurringEvent", "dateutil.rrule", "apscheduler.schedulers.asyncio.AsyncIOScheduler" and local import "lib.openMenu.menu" wrong-import-order C0411
Source 21 0 convention standard import "asyncio" should be placed before third party imports "apscheduler.job.Job", "dateutil.rrule.rrulestr", "discord.message" (...) "recurrent.event_parser.RecurringEvent", "dateutil.rrule", "apscheduler.schedulers.asyncio.AsyncIOScheduler" and local import "lib.openMenu.menu" wrong-import-order C0411
Source 22 0 convention third party import "sentry_sdk" should be placed before local import "lib.openMenu.menu" wrong-import-order C0411
Source 18 0 convention Imports from package dateutil are not grouped ungrouped-imports C0412
Source 19 0 convention Imports from package apscheduler are not grouped ungrouped-imports C0412
Source 1 0 warning Unused date imported from datetime unused-import W0611
Source 3 0 warning Unused UUID imported from uuid unused-import W0611
Source 6 0 warning Unused message imported from discord unused-import W0611
Source 8 0 warning Unused Guild imported from discord.guild unused-import W0611
Source 9 0 warning Unused Message imported from discord.message unused-import W0611
Source 10 0 warning Unused RawReactionActionEvent imported from discord.raw_models unused-import W0611
Source 11 0 warning Unused User imported from discord.user unused-import W0611
Source 14 0 warning Unused menu imported from lib.openMenu unused-import W0611
Source 15 0 warning Unused import discord unused-import W0611
customHelp
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 1 0 convention Module name "customHelp" doesn't conform to snake_case naming style invalid-name C0103
Source 3 0 convention setup Missing function or method docstring missing-function-docstring C0116
customHelp.__init__
Line Column Type Object Message Symbol Message Id
Source 4 0 convention Final newline missing missing-final-newline C0304
Source 1 0 refactor Similar lines in 2 files
==openMenu:[13:143]
==openMenu:[13:143]
_ReactableEmoji = Union[str, discord.Emoji]


async def menu(
ctx: commands.Context,
pages: list,
controls: dict,
message: discord.Message = None,
page: int = 0,
timeout: float = 30.0,
):
"""
An emoji-based menu
.. note:: All pages should be of the same type
.. note:: All functions for handling what a particular emoji does
should be coroutines (i.e. :code:`async def`). Additionally,
they must take all of the parameters of this function, in
addition to a string representing the emoji reacted with.
This parameter should be the last one, and none of the
parameters in the handling functions are optional
Parameters
----------
ctx: commands.Context
The command context
pages: `list` of `str` or `discord.Embed`
The pages of the menu.
controls: dict
A mapping of emoji to the function which handles the action for the
emoji.
message: discord.Message
The message representing the menu. Usually :code:`None` when first opening
the menu
page: int
The current page number of the menu
timeout: float
The time (in seconds) to wait for a reaction
Raises
------
RuntimeError
If either of the notes above are violated
"""
if not all(isinstance(x, discord.Embed) for x in pages) and not all(
isinstance(x, str) for x in pages
):
raise RuntimeError("All pages must be of the same type")
for key, value in controls.items():
maybe_coro = value
if isinstance(value, functools.partial):
maybe_coro = value.func
if not asyncio.iscoroutinefunction(maybe_coro):
raise RuntimeError("Function must be a coroutine")
current_page = pages[page]

if not message:
if isinstance(current_page, discord.Embed):
message = await ctx.send(embed=current_page)
else:
message = await ctx.send(current_page)
# Don't wait for reactions to be added (GH-1797)
# noinspection PyAsyncCall
start_adding_reactions(message, controls.keys(), ctx.bot.loop)
else:
try:
if isinstance(current_page, discord.Embed):
await message.edit(embed=current_page)
else:
await message.edit(content=current_page)
except discord.NotFound:
return

try:
react, user = await ctx.bot.wait_for(
"reaction_add",
check=ReactionPredicate.with_emojis(
tuple(controls.keys()), message, ctx.author),
timeout=timeout,
)
except asyncio.TimeoutError:
try:
await message.clear_reactions()
except discord.Forbidden: # cannot remove all reactions
for key in controls.keys():
await message.remove_reaction(key, ctx.bot.user)
except discord.NotFound:
return
else:
return await controls[react.emoji](
ctx, pages, controls, message, page, timeout, react, user
)


def start_adding_reactions(
message: discord.Message,
emojis: Iterable[_ReactableEmoji],
loop: Optional[asyncio.AbstractEventLoop] = None,
) -> asyncio.Task:
"""Start adding reactions to a message.
This is a non-blocking operation - calling this will schedule the
reactions being added, but the calling code will continue to
execute asynchronously. There is no need to await this function.
This is particularly useful if you wish to start waiting for a
reaction whilst the reactions are still being added - in fact,
this is exactly what `menu` uses to do that.
This spawns a `asyncio.Task` object and schedules it on ``loop``.
If ``loop`` omitted, the loop will be retrieved with
`asyncio.get_event_loop`.
Parameters
----------
message: discord.Message
The message to add reactions to.
emojis : Iterable[Union[str, discord.Emoji]]
The emojis to react to the message with.
loop : Optional[asyncio.AbstractEventLoop]
The event loop.
Returns
-------
asyncio.Task
The task for the coroutine adding the reactions.
"""

async def task():
# The task should exit silently if the message is deleted
with contextlib.suppress(discord.NotFound):
for emoji in emojis:
await message.add_reaction(emoji)

if loop is None:
loop = asyncio.get_event_loop()

return loop.create_task(task())
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==predicates:[7:181]
==predicates:[7:181]
_ID_RE = re.compile(r"([0-9]{15,21})$")
_USER_MENTION_RE = re.compile(r"<@!?([0-9]{15,21})>$")
_CHAN_MENTION_RE = re.compile(r"<#([0-9]{15,21})>$")
_ROLE_MENTION_RE = re.compile(r"<&([0-9]{15,21})>$")


class ReactionPredicate(Callable[[discord.Reaction, discord.abc.User], bool]):
"""A collection of predicates for reaction events.
All checks are combined with :meth:`ReactionPredicate.same_context`.
Examples
--------
Confirming a yes/no question with a tick/cross reaction::
from redbot.core.utils.predicates import ReactionPredicate
from redbot.core.utils.menus import start_adding_reactions
msg = await ctx.send("Yes or no?")
start_adding_reactions(msg, ReactionPredicate.YES_OR_NO_EMOJIS)
pred = ReactionPredicate.yes_or_no(msg, ctx.author)
await ctx.bot.wait_for("reaction_add", check=pred)
if pred.result is True:
# User responded with tick
...
else:
# User responded with cross
...
Waiting for the first reaction from any user with one of the first
5 letters of the alphabet::
from redbot.core.utils.predicates import ReactionPredicate
from redbot.core.utils.menus import start_adding_reactions
msg = await ctx.send("React to me!")
emojis = ReactionPredicate.ALPHABET_EMOJIS[:5]
start_adding_reactions(msg, emojis)
pred = ReactionPredicate.with_emojis(emojis, msg)
await ctx.bot.wait_for("reaction_add", check=pred)
# pred.result is now the index of the letter in `emojis`
Attributes
----------
result : Any
The object which the message content matched with. This is
dependent on the predicate used - see each predicate's
documentation for details, not every method will assign this
attribute. Defaults to ``None``.
"""

YES_OR_NO_EMOJIS: ClassVar[Tuple[str, str]] = (
"\N{WHITE HEAVY CHECK MARK}",
"\N{NEGATIVE SQUARED CROSS MARK}",
)
"""Tuple[str, str] : A tuple containing the tick emoji and cross emoji, in that order."""

ALPHABET_EMOJIS: ClassVar[List[str]] = [
chr(code)
for code in range(
ord("\N{REGIONAL INDICATOR SYMBOL LETTER A}"),
ord("\N{REGIONAL INDICATOR SYMBOL LETTER Z}") + 1,
)
]
"""List[str] : A list of all 26 alphabetical letter emojis."""

NUMBER_EMOJIS: ClassVar[List[str]] = [
chr(code) + "\N{COMBINING ENCLOSING KEYCAP}" for code in range(ord("0"), ord("9") + 1)
]
"""List[str] : A list of all single-digit number emojis, 0 through 9."""

def __init__(
self, predicate: Callable[["ReactionPredicate", discord.Reaction, discord.abc.User], bool]
) -> None:
self._pred: Callable[
["ReactionPredicate", discord.Reaction, discord.abc.User], bool
] = predicate
self.result = None

def __call__(self, reaction: discord.Reaction, user: discord.abc.User) -> bool:
return self._pred(self, reaction, user)

# noinspection PyUnusedLocal
@classmethod
def same_context(
cls, message: Optional[discord.Message] = None, user: Optional[discord.abc.User] = None
) -> "ReactionPredicate":
"""Match if a reaction fits the described context.
This will ignore reactions added by the bot user, regardless
of whether or not ``user`` is supplied.
Parameters
----------
message : Optional[discord.Message]
The message which we expect a reaction to. If unspecified,
the reaction's message will be ignored.
user : Optional[discord.abc.User]
The user we expect to react. If unspecified, the user who
added the reaction will be ignored.
Returns
-------
ReactionPredicate
The event predicate.
"""
# noinspection PyProtectedMember
me_id = message._state.self_id
user = None
return cls(
lambda self, r, u: u.id != me_id
and (message is None or r.message.id == message.id)
and (user is None or u.id == user.id)
)

@classmethod
def with_emojis(
cls,
emojis: Sequence[Union[str, discord.Emoji, discord.PartialEmoji]],
message: Optional[discord.Message] = None,
user: Optional[discord.abc.User] = None,
) -> "ReactionPredicate":
"""Match if the reaction is one of the specified emojis.
Parameters
----------
emojis : Sequence[Union[str, discord.Emoji, discord.PartialEmoji]]
The emojis of which one we expect to be reacted.
message : discord.Message
Same as ``message`` in :meth:`same_context`.
user : Optional[discord.abc.User]
Same as ``user`` in :meth:`same_context`.
Returns
-------
ReactionPredicate
The event predicate.
"""
same_context = cls.same_context(message, user)

def predicate(self: ReactionPredicate, r: discord.Reaction, u: discord.abc.User):
if not same_context(r, u):
return False

try:
self.result = emojis.index(r.emoji)
except ValueError:
return False
else:
return True

return cls(predicate)

@classmethod
def yes_or_no(
cls, message: Optional[discord.Message] = None, user: Optional[discord.abc.User] = None
) -> "ReactionPredicate":
"""Match if the reaction is a tick or cross emoji.
The emojis used can are in
`ReactionPredicate.YES_OR_NO_EMOJIS`.
This will assign ``True`` for *yes*, or ``False`` for *no* to
the `result` attribute.
Parameters
----------
message : discord.Message
Same as ``message`` in :meth:`same_context`.
user : Optional[discord.abc.User]
Same as ``user`` in :meth:`same_context`.
Returns
-------
ReactionPredicate
The event predicate.
"""
same_context = cls.same_context(message, user)

def predicate(self: ReactionPredicate, r: discord.Reaction, u: discord.abc.User) -> bool:
if not same_context(r, u):
return False

try:
self.result = not bool(self.YES_OR_NO_EMOJIS.index(r.emoji))
except ValueError:
return False
else:
return True

return cls(predicate)
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==openMenu:[13:143]
==openMenu:[13:143]
_ReactableEmoji = Union[str, discord.Emoji]


async def menu(
ctx: commands.Context,
pages: list,
controls: dict,
message: discord.Message = None,
page: int = 0,
timeout: float = 30.0,
):
"""
An emoji-based menu
.. note:: All pages should be of the same type
.. note:: All functions for handling what a particular emoji does
should be coroutines (i.e. :code:`async def`). Additionally,
they must take all of the parameters of this function, in
addition to a string representing the emoji reacted with.
This parameter should be the last one, and none of the
parameters in the handling functions are optional
Parameters
----------
ctx: commands.Context
The command context
pages: `list` of `str` or `discord.Embed`
The pages of the menu.
controls: dict
A mapping of emoji to the function which handles the action for the
emoji.
message: discord.Message
The message representing the menu. Usually :code:`None` when first opening
the menu
page: int
The current page number of the menu
timeout: float
The time (in seconds) to wait for a reaction
Raises
------
RuntimeError
If either of the notes above are violated
"""
if not all(isinstance(x, discord.Embed) for x in pages) and not all(
isinstance(x, str) for x in pages
):
raise RuntimeError("All pages must be of the same type")
for key, value in controls.items():
maybe_coro = value
if isinstance(value, functools.partial):
maybe_coro = value.func
if not asyncio.iscoroutinefunction(maybe_coro):
raise RuntimeError("Function must be a coroutine")
current_page = pages[page]

if not message:
if isinstance(current_page, discord.Embed):
message = await ctx.send(embed=current_page)
else:
message = await ctx.send(current_page)
# Don't wait for reactions to be added (GH-1797)
# noinspection PyAsyncCall
start_adding_reactions(message, controls.keys(), ctx.bot.loop)
else:
try:
if isinstance(current_page, discord.Embed):
await message.edit(embed=current_page)
else:
await message.edit(content=current_page)
except discord.NotFound:
return

try:
react, user = await ctx.bot.wait_for(
"reaction_add",
check=ReactionPredicate.with_emojis(
tuple(controls.keys()), message, ctx.author),
timeout=timeout,
)
except asyncio.TimeoutError:
try:
await message.clear_reactions()
except discord.Forbidden: # cannot remove all reactions
for key in controls.keys():
await message.remove_reaction(key, ctx.bot.user)
except discord.NotFound:
return
else:
return await controls[react.emoji](
ctx, pages, controls, message, page, timeout, react, user
)


def start_adding_reactions(
message: discord.Message,
emojis: Iterable[_ReactableEmoji],
loop: Optional[asyncio.AbstractEventLoop] = None,
) -> asyncio.Task:
"""Start adding reactions to a message.
This is a non-blocking operation - calling this will schedule the
reactions being added, but the calling code will continue to
execute asynchronously. There is no need to await this function.
This is particularly useful if you wish to start waiting for a
reaction whilst the reactions are still being added - in fact,
this is exactly what `menu` uses to do that.
This spawns a `asyncio.Task` object and schedules it on ``loop``.
If ``loop`` omitted, the loop will be retrieved with
`asyncio.get_event_loop`.
Parameters
----------
message: discord.Message
The message to add reactions to.
emojis : Iterable[Union[str, discord.Emoji]]
The emojis to react to the message with.
loop : Optional[asyncio.AbstractEventLoop]
The event loop.
Returns
-------
asyncio.Task
The task for the coroutine adding the reactions.
"""

async def task():
# The task should exit silently if the message is deleted
with contextlib.suppress(discord.NotFound):
for emoji in emojis:
await message.add_reaction(emoji)

if loop is None:
loop = asyncio.get_event_loop()

return loop.create_task(task())
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==predicates:[7:181]
==predicates:[7:181]
_ID_RE = re.compile(r"([0-9]{15,21})$")
_USER_MENTION_RE = re.compile(r"<@!?([0-9]{15,21})>$")
_CHAN_MENTION_RE = re.compile(r"<#([0-9]{15,21})>$")
_ROLE_MENTION_RE = re.compile(r"<&([0-9]{15,21})>$")


class ReactionPredicate(Callable[[discord.Reaction, discord.abc.User], bool]):
"""A collection of predicates for reaction events.
All checks are combined with :meth:`ReactionPredicate.same_context`.
Examples
--------
Confirming a yes/no question with a tick/cross reaction::
from redbot.core.utils.predicates import ReactionPredicate
from redbot.core.utils.menus import start_adding_reactions
msg = await ctx.send("Yes or no?")
start_adding_reactions(msg, ReactionPredicate.YES_OR_NO_EMOJIS)
pred = ReactionPredicate.yes_or_no(msg, ctx.author)
await ctx.bot.wait_for("reaction_add", check=pred)
if pred.result is True:
# User responded with tick
...
else:
# User responded with cross
...
Waiting for the first reaction from any user with one of the first
5 letters of the alphabet::
from redbot.core.utils.predicates import ReactionPredicate
from redbot.core.utils.menus import start_adding_reactions
msg = await ctx.send("React to me!")
emojis = ReactionPredicate.ALPHABET_EMOJIS[:5]
start_adding_reactions(msg, emojis)
pred = ReactionPredicate.with_emojis(emojis, msg)
await ctx.bot.wait_for("reaction_add", check=pred)
# pred.result is now the index of the letter in `emojis`
Attributes
----------
result : Any
The object which the message content matched with. This is
dependent on the predicate used - see each predicate's
documentation for details, not every method will assign this
attribute. Defaults to ``None``.
"""

YES_OR_NO_EMOJIS: ClassVar[Tuple[str, str]] = (
"\N{WHITE HEAVY CHECK MARK}",
"\N{NEGATIVE SQUARED CROSS MARK}",
)
"""Tuple[str, str] : A tuple containing the tick emoji and cross emoji, in that order."""

ALPHABET_EMOJIS: ClassVar[List[str]] = [
chr(code)
for code in range(
ord("\N{REGIONAL INDICATOR SYMBOL LETTER A}"),
ord("\N{REGIONAL INDICATOR SYMBOL LETTER Z}") + 1,
)
]
"""List[str] : A list of all 26 alphabetical letter emojis."""

NUMBER_EMOJIS: ClassVar[List[str]] = [
chr(code) + "\N{COMBINING ENCLOSING KEYCAP}" for code in range(ord("0"), ord("9") + 1)
]
"""List[str] : A list of all single-digit number emojis, 0 through 9."""

def __init__(
self, predicate: Callable[["ReactionPredicate", discord.Reaction, discord.abc.User], bool]
) -> None:
self._pred: Callable[
["ReactionPredicate", discord.Reaction, discord.abc.User], bool
] = predicate
self.result = None

def __call__(self, reaction: discord.Reaction, user: discord.abc.User) -> bool:
return self._pred(self, reaction, user)

# noinspection PyUnusedLocal
@classmethod
def same_context(
cls, message: Optional[discord.Message] = None, user: Optional[discord.abc.User] = None
) -> "ReactionPredicate":
"""Match if a reaction fits the described context.
This will ignore reactions added by the bot user, regardless
of whether or not ``user`` is supplied.
Parameters
----------
message : Optional[discord.Message]
The message which we expect a reaction to. If unspecified,
the reaction's message will be ignored.
user : Optional[discord.abc.User]
The user we expect to react. If unspecified, the user who
added the reaction will be ignored.
Returns
-------
ReactionPredicate
The event predicate.
"""
# noinspection PyProtectedMember
me_id = message._state.self_id
user = None
return cls(
lambda self, r, u: u.id != me_id
and (message is None or r.message.id == message.id)
and (user is None or u.id == user.id)
)

@classmethod
def with_emojis(
cls,
emojis: Sequence[Union[str, discord.Emoji, discord.PartialEmoji]],
message: Optional[discord.Message] = None,
user: Optional[discord.abc.User] = None,
) -> "ReactionPredicate":
"""Match if the reaction is one of the specified emojis.
Parameters
----------
emojis : Sequence[Union[str, discord.Emoji, discord.PartialEmoji]]
The emojis of which one we expect to be reacted.
message : discord.Message
Same as ``message`` in :meth:`same_context`.
user : Optional[discord.abc.User]
Same as ``user`` in :meth:`same_context`.
Returns
-------
ReactionPredicate
The event predicate.
"""
same_context = cls.same_context(message, user)

def predicate(self: ReactionPredicate, r: discord.Reaction, u: discord.abc.User):
if not same_context(r, u):
return False

try:
self.result = emojis.index(r.emoji)
except ValueError:
return False
else:
return True

return cls(predicate)

@classmethod
def yes_or_no(
cls, message: Optional[discord.Message] = None, user: Optional[discord.abc.User] = None
) -> "ReactionPredicate":
"""Match if the reaction is a tick or cross emoji.
The emojis used can are in
`ReactionPredicate.YES_OR_NO_EMOJIS`.
This will assign ``True`` for *yes*, or ``False`` for *no* to
the `result` attribute.
Parameters
----------
message : discord.Message
Same as ``message`` in :meth:`same_context`.
user : Optional[discord.abc.User]
Same as ``user`` in :meth:`same_context`.
Returns
-------
ReactionPredicate
The event predicate.
"""
same_context = cls.same_context(message, user)

def predicate(self: ReactionPredicate, r: discord.Reaction, u: discord.abc.User) -> bool:
if not same_context(r, u):
return False

try:
self.result = not bool(self.YES_OR_NO_EMOJIS.index(r.emoji))
except ValueError:
return False
else:
return True

return cls(predicate)
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==auto_rank.auto_rank:[83:92]
==auto_update.auto_update:[35:44]
owner = bot.get_user(bot.owner_id)
sentry_sdk.init(
"https://glet_bec06780f9d13acb1a3844fb45d075f0@git.smither.org:443/errortracking/api/v1/projects/8",
attach_stacktrace=True,
server_name=f"{bot.user.display_name if bot.user else ''}"
+ f"({bot.user.id if bot.user else ''})"
+ f"<{owner.global_name if owner else ''}"
+ f"({bot.owner_id})>",
)
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==auto_rank.auto_rank:[148:169]
==auto_update.auto_update:[84:131]
sentry_sdk.capture_exception(error)

async def cog_unload(self):
for job in self.jobs:
try:
job.remove()
except JobLookupError:
pass
self.scheduler.remove_all_jobs()
self.scheduler.shutdown(wait=False)

@commands.Cog.listener()
async def on_message(self, message: Message):
"""
On a message update the message sender's points.
Add if message in message channel
Remove if message in bot channel

Args:
message (Message): The message that got sent
"""
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==auth.auth:[117:126]
==channelReminder.channel_reminder:[64:76]
for job in self.jobs.values():
try:
job.remove()
except:
pass
self.scheduler.remove_all_jobs()
self.scheduler.shutdown(wait=False)

@commands.group()
@commands.admin()
async def reminder(self, ctx):
"""Set and manage channel reminders"""
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==predicates:[140:167]
==predicates:[175:181]
except ValueError:
return False
else:
return True

return cls(predicate)

@classmethod
def yes_or_no(
cls, message: Optional[discord.Message] = None, user: Optional[discord.abc.User] = None
) -> "ReactionPredicate":
"""Match if the reaction is a tick or cross emoji.
The emojis used can are in
`ReactionPredicate.YES_OR_NO_EMOJIS`.
This will assign ``True`` for *yes*, or ``False`` for *no* to
the `result` attribute.
Parameters
----------
message : discord.Message
Same as ``message`` in :meth:`same_context`.
user : Optional[discord.abc.User]
Same as ``user`` in :meth:`same_context`.
Returns
-------
ReactionPredicate
The event predicate.
"""
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==predicates:[140:167]
==predicates:[175:181]
except ValueError:
return False
else:
return True

return cls(predicate)

@classmethod
def yes_or_no(
cls, message: Optional[discord.Message] = None, user: Optional[discord.abc.User] = None
) -> "ReactionPredicate":
"""Match if the reaction is a tick or cross emoji.
The emojis used can are in
`ReactionPredicate.YES_OR_NO_EMOJIS`.
This will assign ``True`` for *yes*, or ``False`` for *no* to
the `result` attribute.
Parameters
----------
message : discord.Message
Same as ``message`` in :meth:`same_context`.
user : Optional[discord.abc.User]
Same as ``user`` in :meth:`same_context`.
Returns
-------
ReactionPredicate
The event predicate.
"""
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==channelReminder.channel_reminder:[34:42]
==yama.yama:[133:141]
self.scheduler = AsyncIOScheduler()
self.scheduler.start()
self._init_task: asyncio.Task = self.bot.loop.create_task(
self.initialize())

async def initialize(self) -> None:
"""Should be called straight after cog instantiation."""
await self.bot.wait_until_ready()
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==channelReminder.channel_reminder:[33:41]
==storycog.storycog:[25:32]
self.config.register_channel(**default_channel)
self.scheduler = AsyncIOScheduler()
self.scheduler.start()
self._init_task: asyncio.Task = self.bot.loop.create_task(
self.initialize())

def cog_unload(self):
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==predicates:[140:167]
==predicates:[175:181]
except ValueError:
return False
else:
return True

return cls(predicate)

@classmethod
def yes_or_no(
cls, message: Optional[discord.Message] = None, user: Optional[discord.abc.User] = None
) -> "ReactionPredicate":
"""Match if the reaction is a tick or cross emoji.
The emojis used can are in
`ReactionPredicate.YES_OR_NO_EMOJIS`.
This will assign ``True`` for *yes*, or ``False`` for *no* to
the `result` attribute.
Parameters
----------
message : discord.Message
Same as ``message`` in :meth:`same_context`.
user : Optional[discord.abc.User]
Same as ``user`` in :meth:`same_context`.
Returns
-------
ReactionPredicate
The event predicate.
"""
duplicate-code R0801
Source 1 0 refactor Similar lines in 2 files
==predicates:[140:167]
==predicates:[175:181]
except ValueError:
return False
else:
return True

return cls(predicate)
duplicate-code R0801
customHelp.custom_help
Line Column Type Object Message Symbol Message Id
Source 18 0 convention Line too long (124/100) line-too-long C0301
Source 31 0 convention Line too long (134/100) line-too-long C0301
Source 43 0 convention Line too long (118/100) line-too-long C0301
Source 56 0 convention Line too long (122/100) line-too-long C0301
Source 34 27 warning Anomalous backslash in string: '\s'. String constant might be missing an r prefix. anomalous-backslash-in-string W1401
Source 34 41 warning Anomalous backslash in string: '\s'. String constant might be missing an r prefix. anomalous-backslash-in-string W1401
Source 30 0 warning CustomHelp.sethelp Redefining built-in 'help' redefined-builtin W0622
Source 30 0 warning CustomHelp.sethelp Unused argument 'help' unused-argument W0613
Source 63 4 refactor CustomHelp.listhelp Too many local variables (21/15) too-many-locals R0914
Source 131 0 convention formatData Missing function or method docstring missing-function-docstring C0116
Source 131 0 convention formatData Function name "formatData" doesn't conform to snake_case naming style invalid-name C0103
Source 155 0 convention command_tree Missing function or method docstring missing-function-docstring C0116
Source 6 0 convention third party import "redbot.core.commands" should be placed before first party import "customHelp.custom_help_formatter.CustomHelpFormatter" wrong-import-order C0411
Source 7 0 convention third party import "redbot.core.bot" should be placed before first party import "customHelp.custom_help_formatter.CustomHelpFormatter" wrong-import-order C0411
Source 8 0 convention standard import "re" should be placed before third party imports "redbot.core.commands.commands.Cog", "redbot.core.commands", "redbot.core.bot" and first party import "customHelp.custom_help_formatter.CustomHelpFormatter" wrong-import-order C0411
Source 9 0 convention third party import "sentry_sdk" should be placed before first party import "customHelp.custom_help_formatter.CustomHelpFormatter" wrong-import-order C0411
Source 6 0 convention Imports from package redbot are not grouped ungrouped-imports C0412
customHelp.custom_help_formatter
Line Column Type Object Message Symbol Message Id
Source 121 4 convention CustomHelpFormatter.get_cog_help_mapping Missing function or method docstring missing-function-docstring C0116
Source 132 4 convention CustomHelpFormatter.get_group_help_mapping Missing function or method docstring missing-function-docstring C0116
Source 142 4 convention CustomHelpFormatter.get_bot_help_mapping Missing function or method docstring missing-function-docstring C0116
Source 151 4 convention CustomHelpFormatter.get_default_tagline Missing function or method docstring missing-function-docstring C0116
Source 158 4 convention CustomHelpFormatter.format_command_help Missing function or method docstring missing-function-docstring C0116
Source 158 4 refactor CustomHelpFormatter.format_command_help Too many local variables (28/15) too-many-locals R0914
Source 251 20 warning CustomHelpFormatter.format_command_help Access to a protected member _string_width of a client class protected-access W0212
Source 257 36 warning CustomHelpFormatter.format_command_help.width_maker Access to a protected member _string_width of a client class protected-access W0212
Source 158 4 refactor CustomHelpFormatter.format_command_help Too many branches (14/12) too-many-branches R0912
Source 158 4 refactor CustomHelpFormatter.format_command_help Too many statements (57/50) too-many-statements R0915
Source 284 4 convention CustomHelpFormatter.group_embed_fields Missing function or method docstring missing-function-docstring C0116
Source 301 8 warning CustomHelpFormatter.group_embed_fields Else clause on loop without a break statement, remove the else and de-indent all the code inside it useless-else-on-loop W0120
Source 307 4 convention CustomHelpFormatter.make_and_send_embeds Missing function or method docstring missing-function-docstring C0116
Source 307 4 refactor CustomHelpFormatter.make_and_send_embeds Too many local variables (17/15) too-many-locals R0914
Source 381 4 convention CustomHelpFormatter.format_cog_help Missing function or method docstring missing-function-docstring C0116
Source 381 4 refactor CustomHelpFormatter.format_cog_help Too many local variables (23/15) too-many-locals R0914
Source 441 20 warning CustomHelpFormatter.format_cog_help Access to a protected member _string_width of a client class protected-access W0212
Source 447 36 warning CustomHelpFormatter.format_cog_help.width_maker Access to a protected member _string_width of a client class protected-access W0212
Source 462 4 convention CustomHelpFormatter.format_bot_help Missing function or method docstring missing-function-docstring C0116
Source 462 4 refactor CustomHelpFormatter.format_bot_help Too many local variables (26/15) too-many-locals R0914
Source 523 16 warning CustomHelpFormatter.format_bot_help Access to a protected member _string_width of a client class protected-access W0212
Source 530 32 warning CustomHelpFormatter.format_bot_help.width_maker Access to a protected member _string_width of a client class protected-access W0212
Source 519 16 warning CustomHelpFormatter.format_bot_help Unused variable 'k' unused-variable W0612
Source 659 16 refactor CustomHelpFormatter.parse_command Unnecessary "else" after "raise", remove the "else" and de-indent the code inside it no-else-raise R1720
Source 667 4 refactor CustomHelpFormatter.send_pages Too many local variables (16/15) too-many-locals R0914
Source 684 12 convention CustomHelpFormatter.send_pages Variable name "use_DMs" doesn't conform to snake_case naming style invalid-name C0103
Source 690 16 refactor CustomHelpFormatter.send_pages Unnecessary "else" after "return", remove the "else" and de-indent the code inside it no-else-return R1705
Source 29 11 error Undefined variable name 'red_help' in __all__ undefined-all-variable E0603
Source 29 23 error Undefined variable name 'RedHelpFormatter' in __all__ undefined-all-variable E0603
ditto
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 3 0 convention setup Missing function or method docstring missing-function-docstring C0116
ditto.__init__
Line Column Type Object Message Symbol Message Id
Source 4 0 convention Final newline missing missing-final-newline C0304
ditto.ditto
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 25 8 warning Ditto.ditto Unnecessary pass statement unnecessary-pass W0107
Source 34 12 warning Ditto.clone Redefining built-in 'bytes' redefined-builtin W0622
Source 37 8 warning Ditto.clone Unnecessary pass statement unnecessary-pass W0107
Source 5 0 convention standard import "random" should be placed before third party imports "discord.ext.commands.bot.Bot", "discord.member.Member", "redbot.core.commands", "discord" wrong-import-order C0411
Source 6 0 convention standard import "time" should be placed before third party imports "discord.ext.commands.bot.Bot", "discord.member.Member", "redbot.core.commands", "discord" wrong-import-order C0411
Source 8 0 convention standard import "urllib" should be placed before third party imports "discord.ext.commands.bot.Bot", "discord.member.Member", "redbot.core.commands", "discord", "redbot.core.commands.context.Context" wrong-import-order C0411
Source 7 0 convention Imports from package redbot are not grouped ungrouped-imports C0412
Source 4 0 warning Unused import discord unused-import W0611
Source 5 0 warning Unused import random unused-import W0611
Source 6 0 warning Unused import time unused-import W0611
Source 8 0 warning Unused import urllib unused-import W0611
messageCloner
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 1 0 convention Module name "messageCloner" doesn't conform to snake_case naming style invalid-name C0103
Source 3 0 convention setup Missing function or method docstring missing-function-docstring C0116
messageCloner.__init__
Line Column Type Object Message Symbol Message Id
Source 4 0 convention Final newline missing missing-final-newline C0304
messageCloner.message_cloner
Line Column Type Object Message Symbol Message Id
Source 19 0 convention Line too long (112/100) line-too-long C0301
Source 26 0 convention Line too long (111/100) line-too-long C0301
Source 43 0 convention Line too long (196/100) line-too-long C0301
Source 43 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 46 0 convention Line too long (115/100) line-too-long C0301
Source 48 0 convention Line too long (232/100) line-too-long C0301
Source 52 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 54 0 convention Line too long (107/100) line-too-long C0301
Source 55 0 convention Unnecessary parens after 'elif' keyword superfluous-parens C0325
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 26 4 convention MessageCloner.clone Missing function or method docstring missing-function-docstring C0116
Source 42 4 convention MessageCloner.on_raw_reaction_add Missing function or method docstring missing-function-docstring C0116
Source 45 8 warning MessageCloner.on_raw_reaction_add Redefining name 'message' from outer scope (line 1) redefined-outer-name W0621
Source 8 0 convention third party import "discord" should be placed before local import "lib.openMenu.menu" wrong-import-order C0411
Source 9 0 convention third party import "sentry_sdk" should be placed before local import "lib.openMenu.menu" wrong-import-order C0411
Source 2 0 warning Unused Guild imported from discord.guild unused-import W0611
Source 4 0 warning Unused User imported from discord.user unused-import W0611
Source 7 0 warning Unused menu imported from lib.openMenu unused-import W0611
openMenu
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 1 0 convention Module name "openMenu" doesn't conform to snake_case naming style invalid-name C0103
Source 12 0 error Attempted relative import beyond top-level package relative-beyond-top-level E0402
Source 17 0 refactor menu Too many arguments (6/5) too-many-arguments R0913
Source 17 0 refactor menu Too many branches (16/12) too-many-branches R0912
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 1 0 convention Module name "openMenu" doesn't conform to snake_case naming style invalid-name C0103
Source 12 0 error Attempted relative import beyond top-level package relative-beyond-top-level E0402
Source 17 0 refactor menu Too many arguments (6/5) too-many-arguments R0913
Source 17 0 refactor menu Too many branches (16/12) too-many-branches R0912
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 1 0 convention Module name "openMenu" doesn't conform to snake_case naming style invalid-name C0103
Source 12 0 error Attempted relative import beyond top-level package relative-beyond-top-level E0402
Source 17 0 refactor menu Too many arguments (6/5) too-many-arguments R0913
Source 17 0 refactor menu Too many branches (16/12) too-many-branches R0912
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 1 0 convention Module name "openMenu" doesn't conform to snake_case naming style invalid-name C0103
Source 12 0 error Attempted relative import beyond top-level package relative-beyond-top-level E0402
Source 17 0 refactor menu Too many arguments (6/5) too-many-arguments R0913
Source 17 0 refactor menu Too many branches (16/12) too-many-branches R0912
osm
Line Column Type Object Message Symbol Message Id
Source 15 0 convention Line too long (124/100) line-too-long C0301
Source 72 0 convention Line too long (150/100) line-too-long C0301
Source 84 0 convention Unnecessary parens after '=' keyword superfluous-parens C0325
Source 101 0 convention Line too long (150/100) line-too-long C0301
Source 116 0 convention Unnecessary parens after '=' keyword superfluous-parens C0325
Source 126 0 convention Line too long (130/100) line-too-long C0301
Source 140 0 convention Line too long (147/100) line-too-long C0301
Source 148 0 convention Line too long (135/100) line-too-long C0301
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 13 0 convention osm Missing class docstring missing-class-docstring C0115
Source 13 0 convention osm Class name "osm" doesn't conform to PascalCase naming style invalid-name C0103
Source 17 4 convention osm.get_data Missing function or method docstring missing-function-docstring C0116
Source 17 4 error osm.get_data Method 'get_data' should have "self" as first argument no-self-argument E0213
Source 17 4 refactor osm.get_data Too many local variables (16/15) too-many-locals R0914
Source 25 8 warning osm.get_data No exception type(s) specified bare-except W0702
Source 24 23 warning osm.get_data Missing timeout argument for method 'requests.request' can cause your program to hang indefinitely missing-timeout W3101
Source 62 4 convention osm.get_admin_access_token Missing function or method docstring missing-function-docstring C0116
Source 62 4 error osm.get_admin_access_token Method 'get_admin_access_token' should have "self" as first argument no-self-argument E0213
Source 63 26 error osm.get_admin_access_token Instance of 'osm' has no 'guild' member no-member E1101
Source 64 30 error osm.get_admin_access_token Instance of 'osm' has no 'guild' member no-member E1101
Source 65 30 error osm.get_admin_access_token Instance of 'osm' has no 'guild' member no-member E1101
Source 66 36 error osm.get_admin_access_token Instance of 'osm' has no 'guild' member no-member E1101
Source 69 29 error osm.get_admin_access_token Instance of 'osm' has no 'guild' member no-member E1101
Source 75 19 warning osm.get_admin_access_token Missing timeout argument for method 'requests.request' can cause your program to hang indefinitely missing-timeout W3101
Source 78 12 warning osm.get_admin_access_token Raising too general exception: Exception broad-exception-raised W0719
Source 79 14 error osm.get_admin_access_token Instance of 'osm' has no 'guild' member no-member E1101
Source 80 14 error osm.get_admin_access_token Instance of 'osm' has no 'guild' member no-member E1101
Source 81 14 error osm.get_admin_access_token Instance of 'osm' has no 'guild' member no-member E1101
Source 70 8 warning osm.get_admin_access_token Unused variable 'error' unused-variable W0612
Source 90 4 convention osm.get_user_access_token Missing function or method docstring missing-function-docstring C0116
Source 90 4 error osm.get_user_access_token Method 'get_user_access_token' should have "self" as first argument no-self-argument E0213
Source 92 26 error osm.get_user_access_token Instance of 'osm' has no 'guild' member no-member E1101
Source 93 30 error osm.get_user_access_token Instance of 'osm' has no 'guild' member no-member E1101
Source 94 30 error osm.get_user_access_token Instance of 'osm' has no 'member' member no-member E1101
Source 95 36 error osm.get_user_access_token Instance of 'osm' has no 'member' member no-member E1101
Source 98 29 error osm.get_user_access_token Instance of 'osm' has no 'member' member no-member E1101
Source 105 19 warning osm.get_user_access_token Missing timeout argument for method 'requests.request' can cause your program to hang indefinitely missing-timeout W3101
Source 110 12 warning osm.get_user_access_token Raising too general exception: Exception broad-exception-raised W0719
Source 111 14 error osm.get_user_access_token Instance of 'osm' has no 'member' member no-member E1101
Source 112 14 error osm.get_user_access_token Instance of 'osm' has no 'member' member no-member E1101
Source 113 14 error osm.get_user_access_token Instance of 'osm' has no 'member' member no-member E1101
Source 99 8 warning osm.get_user_access_token Unused variable 'error' unused-variable W0612
Source 122 4 convention osm.get_next_items Missing function or method docstring missing-function-docstring C0116
Source 122 4 error osm.get_next_items Method 'get_next_items' should have "self" as first argument no-self-argument E0213
Source 133 19 warning osm.get_next_items Missing timeout argument for method 'requests.request' can cause your program to hang indefinitely missing-timeout W3101
Source 141 27 warning osm.get_next_items Missing timeout argument for method 'requests.request' can cause your program to hang indefinitely missing-timeout W3101
Source 149 27 warning osm.get_next_items Missing timeout argument for method 'requests.request' can cause your program to hang indefinitely missing-timeout W3101
Source 157 4 convention osm.get_section_type Missing function or method docstring missing-function-docstring C0116
Source 157 4 error osm.get_section_type Method 'get_section_type' should have "self" as first argument no-self-argument E0213
Source 164 19 warning osm.get_section_type Missing timeout argument for method 'requests.request' can cause your program to hang indefinitely missing-timeout W3101
Source 169 4 convention osm.get_current_term Missing function or method docstring missing-function-docstring C0116
Source 169 4 error osm.get_current_term Method 'get_current_term' should have "self" as first argument no-self-argument E0213
Source 176 19 warning osm.get_current_term Missing timeout argument for method 'requests.request' can cause your program to hang indefinitely missing-timeout W3101
Source 5 0 convention standard import "datetime" should be placed before third party imports "requests", "redbot.core.Config", "discord.Guild" wrong-import-order C0411
predicates
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 104 16 warning ReactionPredicate.same_context Access to a protected member _state of a client class protected-access W0212
Source 139 12 refactor ReactionPredicate.with_emojis.predicate Unnecessary "else" after "return", remove the "else" and de-indent the code inside it no-else-return R1705
Source 174 12 refactor ReactionPredicate.yes_or_no.predicate Unnecessary "else" after "return", remove the "else" and de-indent the code inside it no-else-return R1705
Source 2 0 warning Unused Pattern imported from typing unused-import W0611
Source 2 0 warning Unused cast imported from typing unused-import W0611
Source 6 0 warning Unused commands imported from redbot.core unused-import W0611
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 104 16 warning ReactionPredicate.same_context Access to a protected member _state of a client class protected-access W0212
Source 139 12 refactor ReactionPredicate.with_emojis.predicate Unnecessary "else" after "return", remove the "else" and de-indent the code inside it no-else-return R1705
Source 174 12 refactor ReactionPredicate.yes_or_no.predicate Unnecessary "else" after "return", remove the "else" and de-indent the code inside it no-else-return R1705
Source 2 0 warning Unused Pattern imported from typing unused-import W0611
Source 2 0 warning Unused cast imported from typing unused-import W0611
Source 6 0 warning Unused commands imported from redbot.core unused-import W0611
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 104 16 warning ReactionPredicate.same_context Access to a protected member _state of a client class protected-access W0212
Source 139 12 refactor ReactionPredicate.with_emojis.predicate Unnecessary "else" after "return", remove the "else" and de-indent the code inside it no-else-return R1705
Source 174 12 refactor ReactionPredicate.yes_or_no.predicate Unnecessary "else" after "return", remove the "else" and de-indent the code inside it no-else-return R1705
Source 2 0 warning Unused Pattern imported from typing unused-import W0611
Source 2 0 warning Unused cast imported from typing unused-import W0611
Source 6 0 warning Unused commands imported from redbot.core unused-import W0611
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 104 16 warning ReactionPredicate.same_context Access to a protected member _state of a client class protected-access W0212
Source 139 12 refactor ReactionPredicate.with_emojis.predicate Unnecessary "else" after "return", remove the "else" and de-indent the code inside it no-else-return R1705
Source 174 12 refactor ReactionPredicate.yes_or_no.predicate Unnecessary "else" after "return", remove the "else" and de-indent the code inside it no-else-return R1705
Source 2 0 warning Unused Pattern imported from typing unused-import W0611
Source 2 0 warning Unused cast imported from typing unused-import W0611
Source 6 0 warning Unused commands imported from redbot.core unused-import W0611
quote.quote
Line Column Type Object Message Symbol Message Id
Source 34 0 convention Line too long (124/100) line-too-long C0301
storycog
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 3 0 convention setup Missing function or method docstring missing-function-docstring C0116
storycog.__init__
Line Column Type Object Message Symbol Message Id
Source 4 0 convention Final newline missing missing-final-newline C0304
storycog.storycog
Line Column Type Object Message Symbol Message Id
Source 21 0 convention Line too long (108/100) line-too-long C0301
Source 40 0 convention Line too long (102/100) line-too-long C0301
Source 67 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 75 29 convention Trailing whitespace trailing-whitespace C0303
Source 114 0 convention Line too long (137/100) line-too-long C0301
Source 179 0 convention Line too long (109/100) line-too-long C0301
Source 191 0 convention Line too long (153/100) line-too-long C0301
Source 220 0 convention Line too long (149/100) line-too-long C0301
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 32 4 warning StoryCog.cog_unload Method 'cog_unload' was expected to be 'async', found it instead as 'non-async' invalid-overridden-method W0236
Source 36 4 convention StoryCog.initialize Missing function or method docstring missing-function-docstring C0116
Source 38 8 warning StoryCog.initialize Unused variable 'all_channel_data' unused-variable W0612
Source 42 4 convention StoryCog.sendCurrentStage Method name "sendCurrentStage" doesn't conform to snake_case naming style invalid-name C0103
Source 45 16 warning StoryCog.sendCurrentStage Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely missing-timeout W3101
Source 61 8 warning StoryCog.story Unnecessary pass statement unnecessary-pass W0107
Source 96 4 convention StoryCog.count_votes Missing function or method docstring missing-function-docstring C0116
Source 100 12 warning StoryCog.count_votes Redefining name 'channel' from outer scope (line 1) redefined-outer-name W0621
Source 103 20 warning StoryCog.count_votes Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely missing-timeout W3101
Source 111 12 refactor StoryCog.count_votes Unnecessary "else" after "continue", remove the "else" and de-indent the code inside it no-else-continue R1724
Source 116 8 warning StoryCog.count_votes Unnecessary pass statement unnecessary-pass W0107
Source 96 32 warning StoryCog.count_votes Unused argument 'ctx' unused-argument W0613
Source 8 0 convention standard import "json" should be placed before third party imports "discord.channel", "discord.ext.commands.core.Command", "redbot.core.commands" (...) "redbot.core.bot.Red", "discord", "requests" wrong-import-order C0411
Source 9 0 convention standard import "re" should be placed before third party imports "discord.channel", "discord.ext.commands.core.Command", "redbot.core.commands" (...) "redbot.core.bot.Red", "discord", "requests" wrong-import-order C0411
Source 10 0 convention standard import "asyncio" should be placed before third party imports "discord.channel", "discord.ext.commands.core.Command", "redbot.core.commands" (...) "redbot.core.bot.Red", "discord", "requests" wrong-import-order C0411
Source 12 0 convention Imports from package discord are not grouped ungrouped-imports C0412
Source 1 0 warning Unused channel imported from discord unused-import W0611
Source 2 0 warning Unused Command imported from discord.ext.commands.core unused-import W0611
Source 4 0 warning Unused command imported from redbot.core.commands.commands unused-import W0611
Source 8 0 warning Unused import json unused-import W0611
Source 9 0 warning Unused import re unused-import W0611
Source 12 0 warning Unused tasks imported from discord.ext unused-import W0611
sudo
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 3 0 convention setup Missing function or method docstring missing-function-docstring C0116
sudo.__init__
Line Column Type Object Message Symbol Message Id
Source 4 0 convention Final newline missing missing-final-newline C0304
sudo.sudo
Line Column Type Object Message Symbol Message Id
Source 20 0 convention Line too long (112/100) line-too-long C0301
Source 47 0 convention Line too long (109/100) line-too-long C0301
Source 59 0 convention Line too long (114/100) line-too-long C0301
Source 64 0 convention Line too long (104/100) line-too-long C0301
Source 66 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 68 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 70 0 convention Line too long (110/100) line-too-long C0301
Source 76 0 convention Line too long (105/100) line-too-long C0301
Source 78 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 82 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 86 0 convention Line too long (118/100) line-too-long C0301
Source 118 0 convention Unnecessary parens after 'while' keyword superfluous-parens C0325
Source 119 0 convention Line too long (101/100) line-too-long C0301
Source 130 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 137 0 convention Unnecessary parens after 'elif' keyword superfluous-parens C0325
Source 139 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 147 0 convention Line too long (103/100) line-too-long C0301
Source 152 0 convention Line too long (128/100) line-too-long C0301
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 45 24 warning Sudo.sudo Redefining built-in 'id' redefined-builtin W0622
Source 35 24 convention Sudo.sudo Unnecessarily calls dunder method __call__. Invoke instance directly. unnecessary-dunder-call C2801
Source 35 24 convention Sudo.sudo Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 41 28 convention Sudo.sudo Unnecessarily calls dunder method __call__. Invoke instance directly. unnecessary-dunder-call C2801
Source 41 28 convention Sudo.sudo Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 43 19 convention Sudo.sudo Comparison 'command == None' should be 'command is None' singleton-comparison C0121
Source 67 18 convention Sudo.sudogrant Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 69 18 convention Sudo.sudogrant Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 79 18 convention Sudo.sudorevoke Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 83 18 convention Sudo.sudorevoke Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 99 23 warning Sudo.sudolist Redefining name 'commands' from outer scope (line 4) redefined-outer-name W0621
Source 104 26 convention Sudo.sudolist Formatting a regular string which could be an f-string consider-using-f-string C0209
Source 112 26 convention Sudo.sudolist Formatting a regular string which could be an f-string consider-using-f-string C0209
Source 105 25 warning Sudo.sudolist Unused variable 'allowed' unused-variable W0612
Source 123 4 convention Sudo.find_command Missing function or method docstring missing-function-docstring C0116
Source 130 15 convention Sudo.find_command Comparison 'new_command != None' should be 'new_command is not None' singleton-comparison C0121
Source 131 16 refactor Sudo.find_command Unnecessary "else" after "continue", remove the "else" and de-indent the code inside it no-else-continue R1724
Source 131 37 convention Sudo.find_command Use command_str.rsplit(' ', maxsplit=1)[-1] instead use-maxsplit-arg C0207
Source 137 17 convention Sudo.find_command Comparison 'alias_cog != None' should be 'alias_cog is not None' singleton-comparison C0121
Source 138 47 warning Sudo.find_command Access to a protected member _aliases of a client class protected-access W0212
Source 147 4 convention Sudo.convert_params Missing function or method docstring missing-function-docstring C0116
Source 151 24 warning Sudo.convert_params Access to a protected member _get_converter of a client class protected-access W0212
Source 152 19 refactor Sudo.convert_params Consider merging these comparisons with 'in' by using 'param.kind in (param.VAR_POSITIONAL, param.POSITIONAL_OR_KEYWORD)'. Use a set instead if elements are hashable. consider-using-in R1714
Source 150 12 warning Sudo.convert_params Unused variable 'name' unused-variable W0612
Source 11 0 convention standard import "copy" should be placed before third party imports "discord.utils", "redbot.core.commands", "redbot.core.commands.commands.Command" (...) "discord.ext.commands.Bot", "discord", "sentry_sdk" wrong-import-order C0411
Source 8 0 convention Imports from package discord are not grouped ungrouped-imports C0412
Source 11 0 warning Unused import copy unused-import W0611
yama
Line Column Type Object Message Symbol Message Id
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 3 0 convention setup Missing function or method docstring missing-function-docstring C0116
yama.__init__
Line Column Type Object Message Symbol Message Id
Source 4 0 convention Final newline missing missing-final-newline C0304
yama.message_listener
Line Column Type Object Message Symbol Message Id
Source 10 0 convention Line too long (112/100) line-too-long C0301
Source 15 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 18 0 convention Line too long (209/100) line-too-long C0301
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 7 0 convention Message_Listener Missing class docstring missing-class-docstring C0115
Source 7 0 convention Message_Listener Class name "Message_Listener" doesn't conform to PascalCase naming style invalid-name C0103
Source 13 4 convention Message_Listener.on_message Missing function or method docstring missing-function-docstring C0116
Source 18 29 convention Message_Listener.on_message Formatting a regular string which could be an f-string consider-using-f-string C0209
Source 7 0 refactor Message_Listener Too few public methods (1/2) too-few-public-methods R0903
Source 1 0 warning Unused error imported from re unused-import W0611
yama.yama
Line Column Type Object Message Symbol Message Id
Source 52 0 convention Line too long (206/100) line-too-long C0301
Source 57 0 convention Line too long (103/100) line-too-long C0301
Source 59 0 convention Line too long (109/100) line-too-long C0301
Source 60 0 convention Line too long (101/100) line-too-long C0301
Source 63 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 67 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 69 0 convention Unnecessary parens after 'elif' keyword superfluous-parens C0325
Source 74 0 convention Line too long (106/100) line-too-long C0301
Source 79 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 81 0 convention Unnecessary parens after 'elif' keyword superfluous-parens C0325
Source 87 0 convention Line too long (106/100) line-too-long C0301
Source 91 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 95 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 97 0 convention Unnecessary parens after 'elif' keyword superfluous-parens C0325
Source 102 0 convention Line too long (102/100) line-too-long C0301
Source 107 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 109 0 convention Unnecessary parens after 'elif' keyword superfluous-parens C0325
Source 115 0 convention Line too long (102/100) line-too-long C0301
Source 126 0 convention Line too long (112/100) line-too-long C0301
Source 147 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 152 0 convention Line too long (108/100) line-too-long C0301
Source 157 0 convention Unnecessary parens after 'if' keyword superfluous-parens C0325
Source 160 0 convention Line too long (215/100) line-too-long C0301
Source 169 0 convention Line too long (118/100) line-too-long C0301
Source 175 0 convention Line too long (119/100) line-too-long C0301
Source 179 0 convention Line too long (138/100) line-too-long C0301
Source 194 0 convention Line too long (101/100) line-too-long C0301
Source 1 0 convention Missing module docstring missing-module-docstring C0114
Source 16 0 error Unable to import 'recurrent.event_parser' import-error E0401
Source 24 0 convention Punishment Missing class docstring missing-class-docstring C0115
Source 24 0 refactor Punishment Too many instance attributes (8/7) too-many-instance-attributes R0902
Source 25 4 convention Punishment.Overrides Missing class docstring missing-class-docstring C0115
Source 26 8 convention Punishment.Overrides.mute Missing function or method docstring missing-function-docstring C0116
Source 26 8 error Punishment.Overrides.mute Method 'mute' should have "self" as first argument no-self-argument E0213
Source 35 8 convention Punishment.Overrides.ban Missing function or method docstring missing-function-docstring C0116
Source 35 8 error Punishment.Overrides.ban Method 'ban' should have "self" as first argument no-self-argument E0213
Source 48 4 convention Punishment.Action Missing class docstring missing-class-docstring C0115
Source 49 8 convention Punishment.Action Class constant name "mute" doesn't conform to UPPER_CASE naming style invalid-name C0103
Source 50 8 convention Punishment.Action Class constant name "ban" doesn't conform to UPPER_CASE naming style invalid-name C0103
Source 52 4 refactor Punishment.__init__ Too many arguments (9/5) too-many-arguments R0913
Source 52 80 warning Punishment.__init__ Redefining name 'channel' from outer scope (line 10) redefined-outer-name W0621
Source 52 177 warning Punishment.__init__ Redefining built-in 'id' redefined-builtin W0622
Source 57 79 convention Punishment.__init__ Comparison 'channel != None' should be 'channel is not None' singleton-comparison C0121
Source 62 4 convention Punishment.end Missing function or method docstring missing-function-docstring C0116
Source 65 12 warning Punishment.end Redefining name 'channel' from outer scope (line 10) redefined-outer-name W0621
Source 72 16 warning Punishment.end Raising too general exception: Exception broad-exception-raised W0719
Source 75 12 warning Punishment.end Unnecessary pass statement unnecessary-pass W0107
Source 84 16 warning Punishment.end Raising too general exception: Exception broad-exception-raised W0719
Source 88 12 warning Punishment.end Unnecessary pass statement unnecessary-pass W0107
Source 90 4 convention Punishment.start Missing function or method docstring missing-function-docstring C0116
Source 93 12 warning Punishment.start Redefining name 'channel' from outer scope (line 10) redefined-outer-name W0621
Source 100 16 warning Punishment.start Raising too general exception: Exception broad-exception-raised W0719
Source 102 27 convention Punishment.start Formatting a regular string which could be an f-string consider-using-f-string C0209
Source 103 12 warning Punishment.start Unnecessary pass statement unnecessary-pass W0107
Source 112 16 warning Punishment.start Raising too general exception: Exception broad-exception-raised W0719
Source 115 27 convention Punishment.start Formatting a regular string which could be an f-string consider-using-f-string C0209
Source 116 12 warning Punishment.start Unnecessary pass statement unnecessary-pass W0107
Source 145 12 warning Yama.initialize Redefining name 'channel' from outer scope (line 10) redefined-outer-name W0621
Source 145 12 warning Yama.initialize Unused variable 'channel' unused-variable W0612
Source 155 4 convention Yama.on_message Missing function or method docstring missing-function-docstring C0116
Source 155 31 warning Yama.on_message Redefining name 'message' from outer scope (line 9) redefined-outer-name W0621
Source 159 16 warning Yama.on_message Redefining name 'channel' from outer scope (line 10) redefined-outer-name W0621
Source 160 35 convention Yama.on_message Formatting a regular string which could be an f-string consider-using-f-string C0209
Source 164 4 convention Yama.yama Missing function or method docstring missing-function-docstring C0116
Source 169 42 warning Yama.tempban Redefining name 'member' from outer scope (line 9) redefined-outer-name W0621
Source 169 58 warning Yama.tempban Redefining name 'channel' from outer scope (line 10) redefined-outer-name W0621
Source 175 43 warning Yama.tempmute Redefining name 'member' from outer scope (line 9) redefined-outer-name W0621
Source 175 59 warning Yama.tempmute Redefining name 'channel' from outer scope (line 10) redefined-outer-name W0621
Source 179 4 convention Yama.punish Missing function or method docstring missing-function-docstring C0116
Source 179 4 refactor Yama.punish Too many arguments (6/5) too-many-arguments R0913
Source 179 68 warning Yama.punish Redefining name 'member' from outer scope (line 9) redefined-outer-name W0621
Source 179 84 warning Yama.punish Redefining name 'channel' from outer scope (line 10) redefined-outer-name W0621
Source 196 8 warning Yama.punish Redefining built-in 'id' redefined-builtin W0622
Source 202 14 convention Yama.punish Unnecessarily calls dunder method __getattr__. Access attribute directly or use getattr built-in function. unnecessary-dunder-call C2801
Source 179 41 warning Yama.punish Unused argument 'action' unused-argument W0613
Source 207 4 convention Yama.list Missing function or method docstring missing-function-docstring C0116
Source 207 39 warning Yama.list Redefining name 'member' from outer scope (line 9) redefined-outer-name W0621
Source 210 12 warning Yama.list Redefining built-in 'id' redefined-builtin W0622
Source 210 12 warning Yama.list Unused variable 'id' unused-variable W0612
Source 7 0 convention third party import "apscheduler.schedulers.asyncio.AsyncIOScheduler" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 8 0 convention third party import "dateutil.rrule.rrule" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 9 0 convention third party import "discord.member" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 10 0 convention third party import "discord.channel" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 11 0 convention third party import "discord.abc.GuildChannel" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 12 0 convention third party import "discord.channel.TextChannel" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 13 0 convention third party import "discord.guild.Guild" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 14 0 convention third party import "discord.raw_models.RawReactionActionEvent" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 15 0 convention third party import "discord.user.User" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 16 0 convention third party import "recurrent.event_parser.RecurringEvent" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 17 0 convention third party import "redbot.core.commands" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 18 0 convention third party import "redbot.core.bot.Red" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 19 0 convention third party import "discord" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 20 0 convention third party import "redbot.core.commands.context.Context" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 21 0 convention third party import "sentry_sdk" should be placed before first party import "yama.message_listener.Message_Listener" wrong-import-order C0411
Source 20 0 convention Imports from package redbot are not grouped ungrouped-imports C0412
Source 2 0 warning Unused time imported from datetime unused-import W0611
Source 6 0 warning Unused Message_Listener imported from yama.message_listener unused-import W0611
Source 8 0 warning Unused rrule imported from dateutil.rrule unused-import W0611
Source 9 0 warning Unused message imported from discord unused-import W0611
Source 11 0 warning Unused _Overwrites imported from discord.abc unused-import W0611
Source 14 0 warning Unused RawReactionActionEvent imported from discord.raw_models unused-import W0611