Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Sep 27, 2024
1 parent 5bad1e9 commit a441b89
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion djangocms_frontend/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def get_plugin_urls(self):
from django.urls import re_path

info = f"{self.model._meta.app_label}_{self.model._meta.model_name}"
pat = lambda regex, fn: re_path(regex, fn, name=f"{info}_{fn.__name__}")

def pat(regex, fn):
return re_path(regex, fn, name=f"{info}_{fn.__name__}")

return [
pat(r'edit-field/(%s)/([a-z\-]+)/$' % SLUG_REGEXP, self.edit_field),
Expand Down
2 changes: 2 additions & 0 deletions djangocms_frontend/contrib/grid/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ class Meta:
max_value=GRID_SIZE,
)


GridRowBaseForm.Meta.entangled_fields["config"] += extra_fields_column.keys()


GridRowForm = type(
"GridRowBaseForm",
(GridRowBaseForm,),
Expand Down
5 changes: 4 additions & 1 deletion djangocms_frontend/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ def get_urls(self):
Register the url for the single field edit view
"""
info = f"{self.model._meta.app_label}_{self.model._meta.model_name}"

Check warning on line 162 in djangocms_frontend/helpers.py

View check run for this annotation

Codecov / codecov/patch

djangocms_frontend/helpers.py#L162

Added line #L162 was not covered by tests
pat = lambda regex, fn: re_path(regex, self.admin_site.admin_view(fn), name=f"{info}_{fn.__name__}")

def pat(regex, fn):
return re_path(regex, self.admin_site.admin_view(fn), name=f"{info}_{fn.__name__}")

Check warning on line 165 in djangocms_frontend/helpers.py

View check run for this annotation

Codecov / codecov/patch

djangocms_frontend/helpers.py#L164-L165

Added lines #L164 - L165 were not covered by tests

url_patterns = [

Check warning on line 167 in djangocms_frontend/helpers.py

View check run for this annotation

Codecov / codecov/patch

djangocms_frontend/helpers.py#L167

Added line #L167 was not covered by tests
pat(r'edit-field/(%s)/([a-z\-]+)/$' % SLUG_REGEXP, self.edit_field),
]
Expand Down

0 comments on commit a441b89

Please sign in to comment.