Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix two problems found by LGTM
Patryk Zawadzkiba338a65251d
diff --git a/saleor/core/payments.py b/saleor/core/payments.pyindex e197a9cef7..f4f6d70029 100644--- a/saleor/core/payments.py+++ b/saleor/core/payments.py@@ -13,7 +13,7 @@ if TYPE_CHECKING:class PaymentInterface(ABC):@abstractmethod- def list_payment_gateways(self, active_only: bool) -> List[dict]:+ def list_payment_gateways(self, active_only: bool = True) -> List[dict]:pass@abstractmethoddiff --git a/saleor/shipping/models.py b/saleor/shipping/models.pyindex 0b8d5d3fa7..7452e39e39 100644--- a/saleor/shipping/models.py+++ b/saleor/shipping/models.py@@ -54,15 +54,11 @@ def _get_weight_type_display(min_weight, max_weight):max_weight = convert_weight(max_weight, default_unit)if max_weight is None:- return (- "Applies to orders heavier than the threshold",- "%(min_weight)s and up" % {"min_weight": min_weight},- )- return ("Applies to orders of total weight within this range",)- "%(min_weight)s to %(max_weight)s" % {+ return ("%(min_weight)s and up" % {"min_weight": min_weight},)+ return "%(min_weight)s to %(max_weight)s" % {"min_weight": min_weight,"max_weight": max_weight,- },+ }class ShippingZone(models.Model):