From e313cbf8a70c52a1fb5a98182194498f5bbfa3da Mon Sep 17 00:00:00 2001 From: Fabian Braun Date: Tue, 10 Dec 2024 12:13:53 +0100 Subject: [PATCH] Fix ruff formats --- djangocms_text/html.py | 2 +- djangocms_text/models.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/djangocms_text/html.py b/djangocms_text/html.py index a99d6449..22d6fd4c 100644 --- a/djangocms_text/html.py +++ b/djangocms_text/html.py @@ -250,7 +250,7 @@ def render_dynamic_attributes(dyn_html: str, admin_objects: bool = False, remove for elem in update_queue: for attr, value in elem.attrib.items(): if attr in dynamic_attr_pool: - target_attr = attr[len(prefix):] + target_attr = attr[len(prefix) :] try: model, pk = value.rsplit(":", 1) obj = from_db[model.strip()][int(pk.strip())] diff --git a/djangocms_text/models.py b/djangocms_text/models.py index 0e04918e..f1980615 100644 --- a/djangocms_text/models.py +++ b/djangocms_text/models.py @@ -145,8 +145,7 @@ def notify_on_autoadd_children(self, request, conf, children): Strings are "%(_tag_child_)s" with the inserted order of children """ replacements = { - f"_tag_child_{str(order)}": plugin_to_tag(child) - for order, child in enumerate(children, start=1) + f"_tag_child_{str(order)}": plugin_to_tag(child) for order, child in enumerate(children, start=1) } self.body = self.body % replacements self.save()