server/general: fix a few pylint warnings

This commit is contained in:
rr- 2016-05-10 11:55:36 +02:00
parent 57297df9e1
commit 3481c1072d
3 changed files with 5 additions and 1 deletions

View file

@ -14,3 +14,6 @@ disable=missing-docstring,no-self-use,too-few-public-methods,multiple-statements
[typecheck] [typecheck]
generated-members=add|add_all generated-members=add|add_all
[similarities]
min-similarity-lines=5

View file

@ -37,7 +37,7 @@ class PostFavorite(Base):
post_id = Column( post_id = Column(
'post_id', Integer, ForeignKey('post.id'), primary_key=True, index=True) 'post_id', Integer, ForeignKey('post.id'), primary_key=True, index=True)
user_id = Column( 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) time = Column('time', DateTime, nullable=False)
post = relationship('Post') post = relationship('Post')

View file

@ -1,5 +1,6 @@
import re import re
# pylint: disable=too-many-return-statements
def get_mime_type(content): def get_mime_type(content):
if not content: if not content:
return 'application/octet-stream' return 'application/octet-stream'