server/general: fix a few pylint warnings
This commit is contained in:
parent
57297df9e1
commit
3481c1072d
3 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import re
|
||||
|
||||
# pylint: disable=too-many-return-statements
|
||||
def get_mime_type(content):
|
||||
if not content:
|
||||
return 'application/octet-stream'
|
||||
|
|
Loading…
Reference in a new issue