From fcabba0da2a6785e8bd46db0f5b86029715017a7 Mon Sep 17 00:00:00 2001 From: Mandel Olaiya Date: Fri, 10 Apr 2026 18:18:49 +0200 Subject: [PATCH] Fix import ordering for Jenkins lint --- mandelstudio/admin_fixes.py | 4 +++- mandelstudio/content_hygiene.py | 1 - mandelstudio/idea_marketplace.py | 1 - .../commands/prepare_idea_marketplace_launch.py | 2 +- mandelstudio/management/commands/purge_demo_data.py | 3 ++- mandelstudio/sitemaps.py | 9 ++++++--- mandelstudio/templatetags/mandelstudio_footer.py | 1 + mandelstudio/urls.py | 6 ++---- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/mandelstudio/admin_fixes.py b/mandelstudio/admin_fixes.py index 39bea05..c9e8101 100644 --- a/mandelstudio/admin_fixes.py +++ b/mandelstudio/admin_fixes.py @@ -8,8 +8,10 @@ def patch_invoice_admin(): date_hierarchy setting injected by the communications plugin. """ try: - import oscar_invoices.admin # noqa: F401 from oscar.core.loading import get_model + + import oscar_invoices.admin # noqa: F401 + from ocyan.plugin.oscar_communications.oscar_invoices_extension.admin import ( InvoiceAdmin, ) diff --git a/mandelstudio/content_hygiene.py b/mandelstudio/content_hygiene.py index 91287bf..d400868 100644 --- a/mandelstudio/content_hygiene.py +++ b/mandelstudio/content_hygiene.py @@ -2,7 +2,6 @@ from __future__ import annotations from typing import Iterable - DEMO_MARKERS: tuple[str, ...] = ( "demo", "dummy", diff --git a/mandelstudio/idea_marketplace.py b/mandelstudio/idea_marketplace.py index ea56f71..b1b5ce3 100644 --- a/mandelstudio/idea_marketplace.py +++ b/mandelstudio/idea_marketplace.py @@ -11,7 +11,6 @@ from oscar.core.loading import get_model from mandelstudio.content_hygiene import DEMO_MARKERS - IDEA_PRODUCT_CLASS_NAME = "Idea Product" DIGITAL_IDEAS_CATEGORY_NAME = "Digital Ideas" SHORT_DESCRIPTION_ATTRIBUTE_CODE = "short_description" diff --git a/mandelstudio/management/commands/prepare_idea_marketplace_launch.py b/mandelstudio/management/commands/prepare_idea_marketplace_launch.py index b7ae01e..ae0b866 100644 --- a/mandelstudio/management/commands/prepare_idea_marketplace_launch.py +++ b/mandelstudio/management/commands/prepare_idea_marketplace_launch.py @@ -3,13 +3,13 @@ from __future__ import annotations from django.core.management.base import BaseCommand from django.db import transaction from django.db.models import Q + from wagtail.blocks import StreamValue from wagtail.models import Page from mandelstudio.content_hygiene import BLOCKED_DEMO_PAGE_SLUGS, DEMO_MARKERS from mandelstudio.idea_marketplace import seed_idea_marketplace_products - HOME_COPY = { "nl": { "badge": "IDEA MARKETPLACE", diff --git a/mandelstudio/management/commands/purge_demo_data.py b/mandelstudio/management/commands/purge_demo_data.py index 04f482e..3cd6e11 100644 --- a/mandelstudio/management/commands/purge_demo_data.py +++ b/mandelstudio/management/commands/purge_demo_data.py @@ -4,9 +4,10 @@ from typing import Iterable from django.core.management.base import BaseCommand from django.db.models import Q -from oscar.core.loading import get_model + from wagtail.models import Page +from oscar.core.loading import get_model IDEA_PRODUCT_TITLES = { "B2B Webshop Starter Blueprint", diff --git a/mandelstudio/sitemaps.py b/mandelstudio/sitemaps.py index 4d2e472..e1ac0b6 100644 --- a/mandelstudio/sitemaps.py +++ b/mandelstudio/sitemaps.py @@ -1,12 +1,15 @@ from django.contrib.sitemaps.views import index as sitemap_index_view from django.contrib.sitemaps.views import sitemap as sitemap_section_view from django.http import HttpResponse + from wagtail.models import Locale, Page from ocyan.plugin.wagtail_oscar_integration.constants import CACHE_DURATION -from ocyan.plugin.wagtail_oscar_integration.sitemap import CategorySitemap -from ocyan.plugin.wagtail_oscar_integration.sitemap import ProductSitemap -from ocyan.plugin.wagtail_oscar_integration.sitemap import ShopSitemap +from ocyan.plugin.wagtail_oscar_integration.sitemap import ( + CategorySitemap, + ProductSitemap, + ShopSitemap, +) from ocyan.plugin.wagtail_oscar_integration.sitemap import ( WagtailSitemap as BaseWagtailSitemap, ) diff --git a/mandelstudio/templatetags/mandelstudio_footer.py b/mandelstudio/templatetags/mandelstudio_footer.py index 885af7c..66f52bd 100644 --- a/mandelstudio/templatetags/mandelstudio_footer.py +++ b/mandelstudio/templatetags/mandelstudio_footer.py @@ -1,4 +1,5 @@ from django import template + from wagtail.models import Site from mandelstudio.models import LocalizedFooterContent diff --git a/mandelstudio/urls.py b/mandelstudio/urls.py index b5d0a7f..be4b6d4 100644 --- a/mandelstudio/urls.py +++ b/mandelstudio/urls.py @@ -1,12 +1,10 @@ -from django.views.decorators.cache import cache_page from django.urls import include, path +from django.views.decorators.cache import cache_page from ocyan.main.urls import urlpatterns as ocyan_urlpatterns from ocyan.plugin.wagtail_oscar_integration.constants import CACHE_DURATION -from .sitemaps import robots_txt -from .sitemaps import sitemap_index -from .sitemaps import sitemap_section +from .sitemaps import robots_txt, sitemap_index, sitemap_section urlpatterns = [ path("i18n/", include("django.conf.urls.i18n")),