Skip to content

Commit

Permalink
Fix ruff formats
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Dec 10, 2024
1 parent f3ecc14 commit e313cbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion djangocms_text/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())]
Expand Down
3 changes: 1 addition & 2 deletions djangocms_text/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ def notify_on_autoadd_children(self, request, conf, children):
Strings are "%(_tag_child_<order>)s" with the inserted order of children
"""
replacements = {

Check warning on line 147 in djangocms_text/models.py

View check run for this annotation

Codecov / codecov/patch

djangocms_text/models.py#L147

Added line #L147 was not covered by tests
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()

Check warning on line 151 in djangocms_text/models.py

View check run for this annotation

Codecov / codecov/patch

djangocms_text/models.py#L150-L151

Added lines #L150 - L151 were not covered by tests
Expand Down

0 comments on commit e313cbf

Please sign in to comment.