Cleanup some pylint

This commit is contained in:
voussoir 2017-03-23 15:11:28 -07:00
parent dcb946f3df
commit b69ef8ea00
4 changed files with 10 additions and 16 deletions

View file

@ -1,8 +1,6 @@
import flask
import json
from . import helpers
def make_json_response(j, *args, **kwargs):
dumped = json.dumps(j)
response = flask.Response(dumped, *args, **kwargs)

View file

@ -1,5 +1,4 @@
import bcrypt
import collections
import copy
import json
import logging
@ -19,7 +18,6 @@ from . import searchhelpers
from voussoirkit import cacheclass
from voussoirkit import expressionmatch
from voussoirkit import pathclass
from voussoirkit import safeprint
from voussoirkit import spinal
@ -827,15 +825,15 @@ class PDBPhotoMixin:
continue
if any(
not fetch[constants.SQL_PHOTO[key]] or
fetch[constants.SQL_PHOTO[key]] > value for (key, value) in maximums.items()
not fetch[constants.SQL_PHOTO[key]] or fetch[constants.SQL_PHOTO[key]] > value
for (key, value) in maximums.items()
):
#print('Failed maximums')
continue
if any(
not fetch[constants.SQL_PHOTO[key]] or
fetch[constants.SQL_PHOTO[key]] < value for (key, value) in minimums.items()
not fetch[constants.SQL_PHOTO[key]] or fetch[constants.SQL_PHOTO[key]] < value
for (key, value) in minimums.items()
):
#print('Failed minimums')
continue

View file

@ -1,5 +1,3 @@
import shlex
from . import constants
from . import exceptions
from . import helpers
@ -186,7 +184,7 @@ def normalize_limit(limit, warning_bag=None):
limit = int(limit)
if not isinstance(limit, int):
message = 'Invalid limit "%s%"' % limit
message = 'Invalid limit "%s"' % limit
if warning_bag:
warning_bag.add(message)
limit = None
@ -208,7 +206,7 @@ def normalize_offset(offset, warning_bag=None):
offset = int(offset)
if not isinstance(offset, int):
message = 'Invalid offset "%s%"' % offset
message = 'Invalid offset "%s"' % offset
if warning_bag:
warning_bag.add(message)
offset = None