Showing 281 of 281 total issues
Too many local variables (18/15) Open
def render_team(self):
- Read upRead up
- Exclude checks
Used when a function or method has too many local variables.
Missing module docstring Open
import unittest
- Read upRead up
- Exclude checks
Used when a module has no docstring.Empty modules do not require a docstring.
Cannot import 'base_bot' due to syntax error 'invalid syntax (<unknown>, line 223)'</unknown> Open
from base_bot import log
- Read upRead up
- Exclude checks
Used when a syntax error is raised for a module.
Catching too general exception Exception Open
except Exception as e:
- Read upRead up
- Exclude checks
Used when an except catches a too general exception, possibly burying unrelated errors.
Variable name e
doesn't conform to snake_case naming style Open
except Exception as e:
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Missing module docstring Open
import os
- Read upRead up
- Exclude checks
Used when a module has no docstring.Empty modules do not require a docstring.
Missing function or method docstring Open
def draw_watermark(self):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring.Some special methods like init do not require a docstring.
Variable name f
doesn't conform to snake_case naming style Open
f = io.BytesIO(r.content)
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Variable name e
doesn't conform to snake_case naming style Open
e = discord.Embed(title='Restricted Command', color=self.RED)
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Unable to import 'wand.drawing' Open
from wand.drawing import Drawing
- Read upRead up
- Exclude checks
Used when pylint has been unable to import a module.
Missing function or method docstring Open
def test_reference_name_replacement(self):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring.Some special methods like init do not require a docstring.
No name 'status_reporter' in module 'jobs' Open
from jobs.status_reporter import StatusReporter
- Read upRead up
- Exclude checks
Used when a name cannot be found in a module.
Missing function or method docstring Open
def test_matching(self):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring.Some special methods like init do not require a docstring.
Missing function or method docstring Open
def test_search(self):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring.Some special methods like init do not require a docstring.
Variable name f
doesn't conform to snake_case naming style Open
with open(self.CONFIG_FILE) as f:
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Method "__init__" has 9 parameters, which is greater than the 7 authorized. Open
def __init__(self, pet, time_left, message, mention, lang, answer_method, config, override_time_left=None):
- Read upRead up
- Exclude checks
A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.
Noncompliant Code Example
With a maximum number of 4 parameters:
def do_something(param1, param2, param3, param4, param5): ...
Compliant Solution
def do_something(param1, param2, param3, param4): ...
Line too long (104/100) Open
kingdom_width, kingdom_height = scale_down(kingdom_logo.width, kingdom_logo.height, 220)
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Missing function or method docstring Open
def download_image(path):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring.Some special methods like init do not require a docstring.
Line too long (109/100) Open
crafting_message = word_wrap(self.img, draw, self.data["texts"]["in_soulforge"], width - 20, 100)
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Variable name f
doesn't conform to snake_case naming style Open
with open(path, encoding='utf8') as f:
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).