Skip to content

Commit

Permalink
docs: Fix a few typos
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
timgates42 authored and henri-hulski committed Jul 14, 2022
1 parent d3a14da commit 1c0f0cd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cartridge/shop/fields.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion cartridge/shop/management/commands/product_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
4 changes: 2 additions & 2 deletions cartridge/shop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_shop.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 1c0f0cd

Please sign in to comment.