cogs/loot.py
Avoid deeply nested control flow statements. Open
Open
with closing(wiki_db.cursor()) as c:
c.execute("""SELECT item.name FROM item
LEFT JOIN item_attribute att on item_id = item.article_id
WHERE item.name LIKE ? AND article_id = item_id AND att.name = 'imbuement'
LIMIT 1""", (item,))
Avoid deeply nested control flow statements. Open
Open
if not image_copy.getpixel((x + xs, y + ys)) == slot_border[s] \
and image_copy.getpixel((x + xs, y + ys)) not in [(24, 24, 24, 255),
(55, 55, 55, 255),
(57, 57, 57, 255),
(75, 76, 76, 255),
Avoid deeply nested control flow statements. Open
Open
if result:
has_marketable = True
emoji = "💎"
else:
emoji = ""