From 3481c1072d15ffe5cdc88b0ae9d79c81d2807950 Mon Sep 17 00:00:00 2001 From: rr- Date: Tue, 10 May 2016 11:55:36 +0200 Subject: [PATCH] server/general: fix a few pylint warnings --- server/.pylintrc | 3 +++ server/szurubooru/db/post.py | 2 +- server/szurubooru/func/mime.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/.pylintrc b/server/.pylintrc index 067e53d5..87400022 100644 --- a/server/.pylintrc +++ b/server/.pylintrc @@ -14,3 +14,6 @@ disable=missing-docstring,no-self-use,too-few-public-methods,multiple-statements [typecheck] generated-members=add|add_all + +[similarities] +min-similarity-lines=5 diff --git a/server/szurubooru/db/post.py b/server/szurubooru/db/post.py index 9ccef28e..cf98397b 100644 --- a/server/szurubooru/db/post.py +++ b/server/szurubooru/db/post.py @@ -37,7 +37,7 @@ class PostFavorite(Base): post_id = Column( 'post_id', Integer, ForeignKey('post.id'), primary_key=True, index=True) user_id = Column( - 'user_id', Integer, ForeignKey('user.id'), primary_key=True, index=True) + 'user_id', Integer, ForeignKey('user.id'), primary_key=True, index=True) time = Column('time', DateTime, nullable=False) post = relationship('Post') diff --git a/server/szurubooru/func/mime.py b/server/szurubooru/func/mime.py index 26f17f03..76d6e281 100644 --- a/server/szurubooru/func/mime.py +++ b/server/szurubooru/func/mime.py @@ -1,5 +1,6 @@ import re +# pylint: disable=too-many-return-statements def get_mime_type(content): if not content: return 'application/octet-stream'