Skip to content

Commit a7e5e6f

Browse files
committed
Fix flake8 error and improve coverage
1 parent 9372e7b commit a7e5e6f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

djangocms_frontend/plugin_tag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_plugin_class(settings_string: str | type) -> type:
6464
"""Get the plugin class from the settings string or import it if it's a dotted path."""
6565
if isinstance(settings_string, str):
6666
if "." in settings_string:
67-
# import the class if a dotted path is given
67+
# import the class if a dotted path is given - raise can exception if not found
6868
module_name, class_name = settings_string.rsplit(".", 1)
6969
return getattr(importlib.import_module(module_name), class_name)
7070
# Get the plugin class from the plugin pool by its name
@@ -76,7 +76,7 @@ def setup():
7676
allowed_plugin_types = tuple(get_plugin_class(cls) for cls in getattr(settings, "CMS_COMPONENT_PLUGINS", []))
7777
if not allowed_plugin_types:
7878
return
79-
79+
8080
for plugin in plugin_pool.get_all_plugins():
8181
if not issubclass(plugin, allowed_plugin_types):
8282
continue

tests/test_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,5 @@
129129

130130
CMS_COMPONENT_PLUGINS = [
131131
"djangocms_frontend.cms_plugins.CMSUIPlugin",
132-
"djangocms_text.cms_plugins.TextPlugin",
132+
"TextPlugin",
133133
]

0 commit comments

Comments
 (0)