server: make pylint happier

This commit is contained in:
rr- 2017-01-03 21:35:08 +01:00
parent 902a0d3fe0
commit 627574a9c2
3 changed files with 5 additions and 3 deletions

View file

@ -40,9 +40,9 @@ def search_by_image(image_content):
'dist': result['dist'],
'path': result['path'],
}
except elasticsearch.exceptions.ElasticsearchException as ex:
except elasticsearch.exceptions.ElasticsearchException:
raise
except Exception as ex:
except Exception:
raise errors.SearchError('Error searching (invalid input?)')

View file

@ -61,6 +61,7 @@ def run_migrations_online():
with alembic.context.begin_transaction():
alembic.context.run_migrations()
if alembic.context.is_offline_mode():
run_migrations_offline()
else:

View file

@ -66,7 +66,8 @@ def _create_user_filter():
def wrapper(query, criterion, negated):
if isinstance(criterion, criteria.PlainCriterion) \
and not criterion.value:
expr = db.Post.user_id == None # sic
# pylint: disable=singleton-comparison
expr = db.Post.user_id == None
if negated:
expr = ~expr
return query.filter(expr)