maduck/GoWDiscordTeamBot

View on GitHub
graphic_soulforge_preview.py

Summary

Maintainability
A
2 hrs
Test Coverage

File graphic_soulforge_preview.py has 256 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import io
import math
from typing import Mapping

from wand.color import Color
Severity: Minor
Found in graphic_soulforge_preview.py - About 2 hrs to fix

    Too many local variables (25/15)
    Open

        def render_soulforge_screen(self):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a function or method has too many local variables.

    Too many local variables (28/15)
    Open

        def render_affixes(self):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a function or method has too many local variables.

    Too many local variables (16/15)
    Open

        def render_farming(self):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a function or method has too many local variables.

    Too many statements (63/50)
    Open

        def render_affixes(self):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a function or method has too many statements. You should then split it in smaller functions / methods.

    Too many statements (79/50)
    Open

        def render_soulforge_screen(self):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a function or method has too many statements. You should then split it in smaller functions / methods.

    Unable to import 'wand.drawing'
    Open

    from wand.drawing import Drawing
    Severity: Critical
    Found in graphic_soulforge_preview.py by pylint

    Used when pylint has been unable to import a module.

    Unable to import 'wand.color'
    Open

    from wand.color import Color
    Severity: Critical
    Found in graphic_soulforge_preview.py by pylint

    Used when pylint has been unable to import a module.

    Missing function or method docstring
    Open

        def save_image(self):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    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)
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a line is longer than a given number of characters.

    Missing class docstring
    Open

    class WeeklyPreview(BasePreview):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a class has no docstring.Even an empty class must have a docstring.

    Line too long (102/100)
    Open

                heading = f'{self.data["texts"]["dungeon"]} &\n{self.data["texts"]["kingdom_challenges"]}'
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a line is longer than a given number of characters.

    Missing function or method docstring
    Open

    def render_all(result):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a function or method has no docstring.Some special methods like init do not require a docstring.

    Missing module docstring
    Open

    import io
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a module has no docstring.Empty modules do not require a docstring.

    Missing function or method docstring
    Open

        def render_affixes(self):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a function or method has no docstring.Some special methods like init do not require a docstring.

    Line too long (106/100)
    Open

                    my_affix.colorize(color=Color(f'rgb({color_code})'), alpha=Color('rgb(100%, 100%, 100%)'))
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a line is longer than a given number of characters.

    Line too long (105/100)
    Open

                    description = word_wrap(self.img, draw, affix['description'], width - 80, base_size + 10)
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a line is longer than a given number of characters.

    Missing function or method docstring
    Open

        def render_soulforge_screen(self):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a function or method has no docstring.Some special methods like init do not require a docstring.

    Line too long (116/100)
    Open

                    center = left + 300 - hypotenuse * math.sin(rad_angle), top + 350 - hypotenuse * math.cos(rad_angle)
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a line is longer than a given number of characters.

    Missing function or method docstring
    Open

        def get_box_coordinates(self, box_number):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    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 extract_requirements(self) -> Mapping[str, str]:
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a function or method has no docstring.Some special methods like init do not require a docstring.

    Line too long (114/100)
    Open

                        f'x140 {self.data["texts"]["tier_8"]} {self.data["texts"]["kingdom_challenges"]}:\n{kingdoms}'
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a line is longer than a given number of characters.

    Missing function or method docstring
    Open

        def render_farming(self):
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a function or method has no docstring.Some special methods like init do not require a docstring.

    Variable name x doesn't conform to snake_case naming style
    Open

                x = left + width
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

    Line too long (121/100)
    Open

                        f'x100 {jewel["available_on"]}: {self.data["texts"]["gem_bounty"]} ({self.data["texts"]["n_gems"]})',
    Severity: Info
    Found in graphic_soulforge_preview.py by pylint

    Used when a line is longer than a given number of characters.

    There are no issues that match your filters.

    Category
    Status