File command_registry.py
has 1271 lines of code (exceeds 250 allowed). Consider refactoring. Open
import asyncio
import re
from enum import Enum
import aiohttp
Too many arguments (6/5) Open
async def add_slash_command(bot_id,
- Read upRead up
- Exclude checks
Used when a function or method takes too many arguments.
TODO adapt to something more strict, maybe this? Open
# TODO adapt to something more strict, maybe this?
- Read upRead up
- Exclude checks
Used when a warning note as FIXME or XXX is detected.
Unable to import 'aiohttp' Open
import aiohttp
- Read upRead up
- Exclude checks
Used when pylint has been unable to import a module.
Line too long (103/100) Open
async with session.post(url, headers={"Authorization": f"Bot {bot_token}"}, json=base) as resp:
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Too many lines in module (1291/1000) Open
import asyncio
- Read upRead up
- Exclude checks
Used when a module has too many lines, reducing its readability.
Wrong hanging indentation (remove 4 spaces). Open
+ r'(?P<prefix>.)tower (?P<floor>\d+) (?P<scroll_ii>[^ ]+) (?P<scroll_iii>[^ ]+) '
- Read upRead up
- Exclude checks
TODO + r'(?P<prefix>.)tower (?P<floor>d+) (?P<scroll_ii>[^ ]+) (?P<scroll_iii>[^ ]+) ' | ^</scroll_iii></scroll_ii></floor></prefix>
Missing module docstring Open
import asyncio
- Read upRead up
- Exclude checks
Used when a module has no docstring.Empty modules do not require a docstring.
Line too long (109/100) Open
'description': 'Date of weapon release, format MONTH-DAY with two digits each (e.g. 12-25). '
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Line too long (101/100) Open
f'^{LANG_PATTERN}(?P<prefix>.)tower (?P<floor>[^ ]+) (?P<room>[^ ]+) (?P<scroll>[^ ]+)$',
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Constant name aliases
doesn't conform to UPPER_CASE naming style Open
aliases = {
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Line too long (107/100) Open
return await add_slash_command(bot_id, bot_token, guild_id, cmd_name, description, options)
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Consider iterating the dictionary directly instead of calling .keys() Open
for k in PetRescueConfig.DEFAULT_CONFIG.keys()
- Read upRead up
- Exclude checks
Emitted when the keys of a dictionary are iterated through the .keys() method. It is enough to just iterate through the dictionary itself, as in for key in dictionary
.
Line too long (102/100) Open
+ r'(?P<prefix>.)tower (?P<floor>\d+) (?P<scroll_ii>[^ ]+) (?P<scroll_iii>[^ ]+) '
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Line too long (120/100) Open
f'{DEFAULT_PATTERN}toplist update (?P<toplist_id>[a-zA-Z0-9]+) (?P<description>[^,]+)? (?P<items>(.+,?)+)$',
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Line too long (120/100) Open
# \[(?P<weapon_troops>([167]\d{3},?)+){1,4}(?P<banner>3\d{3},?)?(?P<talents>([0-3]{1},?){7})?(?P<class>\d{5})?\]
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Missing class docstring Open
class OptionType(Enum):
- Read upRead up
- Exclude checks
Used when a class has no docstring.Even an empty class must have a docstring.
Line too long (107/100) Open
f'{DEFAULT_PATTERN}towerconfig (?P<category>(rooms|scrolls)) (?P<field>[^ ]+) (?P<values>.+)$',
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Wrong hanging indentation (remove 4 spaces). Open
f'^{LANG_PATTERN}'
- Read upRead up
- Exclude checks
TODO f'^{LANG_PATTERN}' | ^