Cleanup some pylint
This commit is contained in:
		
							parent
							
								
									dcb946f3df
								
							
						
					
					
						commit
						b69ef8ea00
					
				
					 4 changed files with 10 additions and 16 deletions
				
			
		|  | @ -29,7 +29,7 @@ def album_zip_directories(album, recursive=True): | |||
|                 child_directory = os.path.join(root_folder, child_directory) | ||||
|                 directories[child_album] = child_directory | ||||
|     return directories | ||||
|      | ||||
| 
 | ||||
| def album_zip_filenames(album, recursive=True): | ||||
|     ''' | ||||
|     Given an album, produce a dictionary mapping local filepaths to the | ||||
|  | @ -351,4 +351,4 @@ def _unitconvert(value): | |||
|     elif all(c in '0123456789.' for c in value): | ||||
|         return float(value) | ||||
|     else: | ||||
|         return bytestring.parsebytes(value) | ||||
|         return bytestring.parsebytes(value) | ||||
|  |  | |||
|  | @ -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) | ||||
|  |  | |||
|  | @ -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 | ||||
| 
 | ||||
| 
 | ||||
|  | @ -664,7 +662,7 @@ class PDBPhotoMixin: | |||
|             tag_musts = None | ||||
|             tag_mays = None | ||||
|             tag_forbids = None | ||||
|             tag_expression = None     | ||||
|             tag_expression = None | ||||
|         else: | ||||
|             _helper = lambda tagset: searchhelpers.normalize_tag_mmf( | ||||
|                 photodb=self, | ||||
|  | @ -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 | ||||
|  |  | |||
|  | @ -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 | ||||
|  | @ -269,7 +267,7 @@ def normalize_orderby(orderby, warning_bag=None): | |||
|             if warning_bag: | ||||
|                 warning_bag.add(message) | ||||
|             else: | ||||
|                 raise ValueError(message)             | ||||
|                 raise ValueError(message) | ||||
|             direction = 'desc' | ||||
| 
 | ||||
|         requested_order = '%s-%s' % (column, direction) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue