Fixes flake8 errors arising from rebase

This commit is contained in:
Christopher Neugebauer 2016-04-29 11:22:56 +10:00
parent 135f2fb47b
commit b40505117f
7 changed files with 6 additions and 23 deletions

View file

@ -17,7 +17,6 @@ from registrasion.models import conditions
from registrasion.models import inventory
from .category import CategoryController
from .conditions import ConditionController
from .discount import DiscountController
from .flag import FlagController
from .product import ProductController
@ -65,7 +64,6 @@ class CartController(object):
)
return cls(existing)
# Marks the carts that are currently in batches
_FOR_USER = {}
_BATCH_COUNT = collections.defaultdict(int)
@ -156,7 +154,6 @@ class CartController(object):
'''
self.cart.refresh_from_db()
self._recalculate_discounts()
@ -250,8 +247,6 @@ class CartController(object):
# Test each category limit here
for category in by_cat:
#ctrl = CategoryController(category)
#limit = ctrl.user_quantity_remaining(self.cart.user)
limit = with_remainders[category].remainder
# Get the amount so far in the cart

View file

@ -38,7 +38,6 @@ class CategoryController(object):
return set(i.category for i in available)
@classmethod
def attach_user_remainders(cls, user, categories):
'''

View file

@ -1,5 +1,3 @@
import itertools
from django.db.models import Case
from django.db.models import F, Q
from django.db.models import Sum
@ -9,8 +7,6 @@ from django.utils import timezone
from registrasion.models import commerce
from registrasion.models import conditions
from registrasion.models import inventory
_BIG_QUANTITY = 99999999 # A big quantity
@ -134,8 +130,6 @@ class RemainderSetByFilter(object):
if hasattr(self.condition, "remainder"):
return self.condition.remainder
# Mark self.condition with a remainder
qs = type(self.condition).objects.filter(pk=self.condition.id)
qs = self.pre_filter(qs, user)

View file

@ -50,7 +50,6 @@ class DiscountController(object):
categories and products. The discounts also list the available quantity
for this user, not including products that are pending purchase. '''
filtered_clauses = cls._filtered_discounts(user, categories, products)
discounts = []

View file

@ -58,7 +58,6 @@ class ProductController(object):
return out
@classmethod
def attach_user_remainders(cls, user, products):
'''

View file

@ -451,9 +451,6 @@ def _set_quantities_from_products_form(products_form, current_cart):
id__in=pks,
).select_related("category")
# TODO: This is fundamentally dumb
product_quantities = [
(product, id_to_quantity[product.id]) for product in products
]