Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 23, 2024
1 parent 468a43a commit da3fa6d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions ecommerce/discounts_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion flexiblepricing/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,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
):
"""
Expand Down
2 changes: 1 addition & 1 deletion repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

sys.exit(
check_call(
[ # noqa: S603
[
os.path.join(base_dir, "manage.py"), # noqa: PTH118
"shell",
*sys.argv[1:],
Expand Down

0 comments on commit da3fa6d

Please sign in to comment.