From 1c0f0cd864b4444c19eb296c717587e8d5ccd6ea Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Fri, 15 Jul 2022 08:18:58 +1000 Subject: [PATCH] docs: Fix a few typos There are small typos in: - README.rst - cartridge/shop/fields.py - cartridge/shop/management/commands/product_db.py - cartridge/shop/models.py - tests/test_shop.py Fixes: - Should read `this` rather than `thie`. - Should read `variations` rather than `varitations`. - Should read `dynamically` rather than `dynamcally`. - Should read `consistent` rather than `consistant`. - Should read `applicable` rather than `appllicable`. - Should read `accessibility` rather than `accessiblilty`. --- README.rst | 2 +- cartridge/shop/fields.py | 2 +- cartridge/shop/management/commands/product_db.py | 2 +- cartridge/shop/models.py | 4 ++-- tests/test_shop.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 12ad41823..e661a8001 100644 --- a/README.rst +++ b/README.rst @@ -41,7 +41,7 @@ Features * Smart categories (by price range, colour, etc) * Registered or anonymous checkout * Configurable number of checkout steps -* Denormalised data for accessiblilty and performance +* Denormalised data for accessibility and performance * Authenticated customer accounts with transaction history Dependencies diff --git a/cartridge/shop/fields.py b/cartridge/shop/fields.py index 5ef322692..d2d05fed7 100644 --- a/cartridge/shop/fields.py +++ b/cartridge/shop/fields.py @@ -1,6 +1,6 @@ """ Various model fields that mostly provide default field sizes to ensure -these are consistant when used across multiple models. +these are consistent when used across multiple models. """ from locale import localeconv diff --git a/cartridge/shop/management/commands/product_db.py b/cartridge/shop/management/commands/product_db.py index 24b6689a2..d7e19527b 100644 --- a/cartridge/shop/management/commands/product_db.py +++ b/cartridge/shop/management/commands/product_db.py @@ -17,7 +17,7 @@ ProductVariation, ) -# images get copied from thie directory +# images get copied from this directory LOCAL_IMAGE_DIR = "/tmp/orig" # images get copied to this directory under STATIC_ROOT IMAGE_SUFFIXES = [ diff --git a/cartridge/shop/models.py b/cartridge/shop/models.py index b10b978a6..26bb7f004 100644 --- a/cartridge/shop/models.py +++ b/cartridge/shop/models.py @@ -212,7 +212,7 @@ class Meta: class ProductVariationMetaclass(ModelBase): """ - Metaclass for the ``ProductVariation`` model that dynamcally + Metaclass for the ``ProductVariation`` model that dynamically assigns an ``fields.OptionField`` for each option in the ``SHOP_PRODUCT_OPTIONS`` setting. """ @@ -678,7 +678,7 @@ def calculate_discount(self, discount): return discount.calculate(self.total_price()) total = Decimal("0") # Create a list of skus in the cart that are applicable to - # the discount, and total the discount for appllicable items. + # the discount, and total the discount for applicable items. lookup = {"product__in": products, "sku__in": self.skus()} discount_variations = ProductVariation.objects.filter(**lookup) discount_skus = discount_variations.values_list("sku", flat=True) diff --git a/tests/test_shop.py b/tests/test_shop.py index 8e0ed5494..60eee576f 100644 --- a/tests/test_shop.py +++ b/tests/test_shop.py @@ -408,7 +408,7 @@ def test_sale_save(self): """ Regression test for GitHub issue #24. Incorrect exception handle meant that in some cases (usually percentage discount) sale_prices were not - being applied to all products and their varitations. + being applied to all products and their variations. Note: This issues was only relevant using MySQL and with exceptions turned on (which is the default when DEBUG=True).