From a9338f649079b92cfeea0eb4b72c81497f01a286 Mon Sep 17 00:00:00 2001 From: rr- Date: Tue, 2 Aug 2016 12:20:25 +0200 Subject: [PATCH] server/general: fix pylint warnings --- server/szurubooru/func/posts.py | 8 ++++---- server/szurubooru/func/tags.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/szurubooru/func/posts.py b/server/szurubooru/func/posts.py index a58adbb..f00eca5 100644 --- a/server/szurubooru/func/posts.py +++ b/server/szurubooru/func/posts.py @@ -2,7 +2,7 @@ import datetime import sqlalchemy from szurubooru import config, db, errors from szurubooru.func import ( - users, snapshots, scores, comments, tags, tag_categories, util, mime, images, files) + users, snapshots, scores, comments, tags, util, mime, images, files) EMPTY_PIXEL = \ b'\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x01\x00\x00\x00\x00' \ @@ -223,12 +223,12 @@ def update_post_content(post, content): post.canvas_width = None post.canvas_height = None files.save(get_post_content_path(post), content) - update_post_thumbnail(post, content=None, delete=False) + update_post_thumbnail(post, content=None, do_delete=False) -def update_post_thumbnail(post, content=None, delete=True): +def update_post_thumbnail(post, content=None, do_delete=True): if not content: content = files.get(get_post_content_path(post)) - if delete: + if do_delete: files.delete(get_post_thumbnail_backup_path(post)) else: files.save(get_post_thumbnail_backup_path(post), content) diff --git a/server/szurubooru/func/tags.py b/server/szurubooru/func/tags.py index b29eb60..90cc7a9 100644 --- a/server/szurubooru/func/tags.py +++ b/server/szurubooru/func/tags.py @@ -58,10 +58,10 @@ def serialize_tag(tag, options=None): 'lastEditTime': lambda: tag.last_edit_time, 'usages': lambda: tag.post_count, 'suggestions': lambda: [ - relation.names[0].name + relation.names[0].name \ for relation in sort_tags(tag.suggestions)], 'implications': lambda: [ - relation.names[0].name + relation.names[0].name \ for relation in sort_tags(tag.implications)], 'snapshots': lambda: snapshots.get_serialized_history(tag), },