server/general: fix a few pylint warnings
This commit is contained in:
parent
57297df9e1
commit
3481c1072d
|
@ -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
|
||||||
|
|
|
@ -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')
|
||||||
|
|
|
@ -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'
|
||||||
|
|
Loading…
Reference in New Issue