Skip to content

Saleor Core: the high performance, composable, headless commerce API.

convert tax directory into file

Maciej Korycinski7c6781faef06
diff --git a/saleor/checkout/views/summary.py b/saleor/checkout/views/summary.py
index 520cec8c1f..fc632a761b 100644
--- a/saleor/checkout/views/summary.py
+++ b/saleor/checkout/views/summary.py
@@ -7,7 +7,7 @@ from django.utils.translation import pgettext
from ...account.models import Address
from ...core import analytics
from ...core.exceptions import InsufficientStock
-from ...core.taxes.errors import TaxError
+from ...core.taxes import TaxError
from ...discount.models import NotApplicable
from ..forms import CheckoutNoteForm
from ..utils import (
diff --git a/saleor/core/extensions/plugins/avatax/plugin.py b/saleor/core/extensions/plugins/avatax/plugin.py
index 8b0eadcd48..bbda77161b 100644
--- a/saleor/core/extensions/plugins/avatax/plugin.py
+++ b/saleor/core/extensions/plugins/avatax/plugin.py
@@ -6,8 +6,7 @@ from urllib.parse import urljoin
from django.conf import settings
from prices import Money, TaxedMoney, TaxedMoneyRange
-from ....taxes import TaxType, zero_taxed_money
-from ....taxes.errors import TaxError
+from ....taxes import TaxError, TaxType, zero_taxed_money
from ...plugin import BasePlugin
from . import (
META_FIELD,
diff --git a/saleor/core/taxes/__init__.py b/saleor/core/taxes.py
similarity index 96%
rename from saleor/core/taxes/__init__.py
rename to saleor/core/taxes.py
index 8e11b50c08..5e285d298e 100644
--- a/saleor/core/taxes/__init__.py
+++ b/saleor/core/taxes.py
@@ -8,6 +8,10 @@ from django.contrib.sites.models import Site
from prices import Money, MoneyRange, TaxedMoney, TaxedMoneyRange
+class TaxError(Exception):
+ """Default tax error"""
+
+
def zero_money(currency=settings.DEFAULT_CURRENCY):
"""Function used as a model's default."""
return Money(0, currency)
diff --git a/saleor/core/taxes/errors.py b/saleor/core/taxes/errors.py
deleted file mode 100644
index 4a216d9bb5..0000000000
--- a/saleor/core/taxes/errors.py
+++ /dev/null
@@ -1,2 +0,0 @@
-class TaxError(Exception):
- """Default tax error"""
diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.py
index 1a3819d2e8..1b9fcec20c 100644
--- a/saleor/graphql/checkout/mutations.py
+++ b/saleor/graphql/checkout/mutations.py
@@ -24,7 +24,7 @@ from ...checkout.utils import (
from ...core import analytics
from ...core.exceptions import InsufficientStock
from ...core.extensions.manager import get_extensions_manager
-from ...core.taxes.errors import TaxError
+from ...core.taxes import TaxError
from ...discount import models as voucher_model
from ...payment import PaymentError
from ...payment.interface import AddressData