fix: fix 'singleton-comparison' for pylint
This commit is contained in:
		
							parent
							
								
									e884263779
								
							
						
					
					
						commit
						d2b5dce8e3
					
				
					 3 changed files with 12 additions and 4 deletions
				
			
		| 
						 | 
					@ -21,4 +21,3 @@ disable=fixme,
 | 
				
			||||||
        no-member,
 | 
					        no-member,
 | 
				
			||||||
        no-self-argument,
 | 
					        no-self-argument,
 | 
				
			||||||
        redefined-outer-name,
 | 
					        redefined-outer-name,
 | 
				
			||||||
        singleton-comparison,
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -159,7 +159,10 @@ class OrderHandler(GenericHandler):
 | 
				
			||||||
        items = (
 | 
					        items = (
 | 
				
			||||||
            session.query(model.OrderItem)
 | 
					            session.query(model.OrderItem)
 | 
				
			||||||
            .filter(model.OrderItem.pending_product == pending_product)
 | 
					            .filter(model.OrderItem.pending_product == pending_product)
 | 
				
			||||||
            .filter(model.OrderItem.product_id == None)
 | 
					            .filter(
 | 
				
			||||||
 | 
					                model.OrderItem.product_id  # pylint: disable=singleton-comparison
 | 
				
			||||||
 | 
					                == None
 | 
				
			||||||
 | 
					            )
 | 
				
			||||||
            .all()
 | 
					            .all()
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -284,7 +284,10 @@ class OrderView(MasterView):  # pylint: disable=too-many-public-methods
 | 
				
			||||||
        if context["expose_store_id"]:
 | 
					        if context["expose_store_id"]:
 | 
				
			||||||
            stores = (
 | 
					            stores = (
 | 
				
			||||||
                session.query(model.Store)
 | 
					                session.query(model.Store)
 | 
				
			||||||
                .filter(model.Store.archived == False)
 | 
					                .filter(
 | 
				
			||||||
 | 
					                    model.Store.archived  # pylint: disable=singleton-comparison
 | 
				
			||||||
 | 
					                    == False
 | 
				
			||||||
 | 
					                )
 | 
				
			||||||
                .order_by(model.Store.store_id)
 | 
					                .order_by(model.Store.store_id)
 | 
				
			||||||
                .all()
 | 
					                .all()
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
| 
						 | 
					@ -338,7 +341,10 @@ class OrderView(MasterView):  # pylint: disable=too-many-public-methods
 | 
				
			||||||
            batch = (
 | 
					            batch = (
 | 
				
			||||||
                session.query(model.NewOrderBatch)
 | 
					                session.query(model.NewOrderBatch)
 | 
				
			||||||
                .filter(model.NewOrderBatch.created_by == user)
 | 
					                .filter(model.NewOrderBatch.created_by == user)
 | 
				
			||||||
                .filter(model.NewOrderBatch.executed == None)
 | 
					                .filter(
 | 
				
			||||||
 | 
					                    model.NewOrderBatch.executed  # pylint: disable=singleton-comparison
 | 
				
			||||||
 | 
					                    == None
 | 
				
			||||||
 | 
					                )
 | 
				
			||||||
                .one()
 | 
					                .one()
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue