diff --git a/ecommerce/discounts_test.py b/ecommerce/discounts_test.py index b8968e9629..dea01d1d20 100644 --- a/ecommerce/discounts_test.py +++ b/ecommerce/discounts_test.py @@ -67,8 +67,7 @@ def test_discount_factory_adjustment(discounts, products): if type(discount_logic) is DollarsOffDiscount: discounted_price = product.price - discount.amount - if discounted_price < 0: - discounted_price = 0 + discounted_price = max(discounted_price, 0) elif type(discount_logic) is FixedPriceDiscount: discounted_price = discount.amount elif type(discount_logic) is PercentDiscount: diff --git a/flexiblepricing/api_test.py b/flexiblepricing/api_test.py index 5592a0ede9..deee5389cc 100644 --- a/flexiblepricing/api_test.py +++ b/flexiblepricing/api_test.py @@ -429,7 +429,7 @@ def create_run_and_product_and_discount(self, user, courseware_object): return determine_courseware_flexible_price_discount(product, user) - def create_fp_and_compare_tiers( # noqa: PLR0913 + def create_fp_and_compare_tiers( self, courseware_object, income_usd, country_code, user, expected ): """ diff --git a/repl.py b/repl.py index bbe541539d..3982dfabaa 100755 --- a/repl.py +++ b/repl.py @@ -12,7 +12,7 @@ sys.exit( check_call( - [ # noqa: S603 + [ os.path.join(base_dir, "manage.py"), # noqa: PTH118 "shell", *sys.argv[1:],