server: make pylint happier
This commit is contained in:
		
							parent
							
								
									902a0d3fe0
								
							
						
					
					
						commit
						627574a9c2
					
				| @ -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?)') | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -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: | ||||
|  | ||||
| @ -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) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 rr-
						rr-