10000 build(deps): bump amannn/action-semantic-pull-request from 5.5.2 to 5.5.3 by dependabot[bot] · Pull Request #7946 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

build(deps): bump amannn/action-semantic-pull-request from 5.5.2 to 5.5.3 #7946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.5.2
- uses: amannn/action-semantic-pull-request@v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- run: python -Im pip install --user ruff

- name: Run ruff on cms
run: ruff --output-format=github cms
run: ruff check --output-format=github cms

- name: Run ruff on menus
run: ruff --output-format=github menus
run: ruff check --output-format=github menus
8 changes: 4 additions & 4 deletions cms/forms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ def get_page_choices_for_site(site, language):

for page in pages:
translations = page.filtered_translations
titles_by_language = {trans.language: trans.title for trans in translations}
pagecontent_by_language = {trans.language: trans.title for trans in translations}

for language in languages:
for lang in languages:
# EmptyPageContent is used to prevent the cms from trying
# to find a translation in the database
if language in titles_by_language:
title = titles_by_language[language]
if lang in pagecontent_by_language:
title = pagecontent_by_language[lang]
indent = "  " * (page.node.depth - 1)
label = mark_safe(f"{indent}{escape(title)}")
yield (page.pk, label)
Expand Down
4 changes: 2 additions & 2 deletions cms/models/pagemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,8 @@ def clear_cache(self, language=None, menu=False, placeholder=False):

placeholders = self.get_placeholders(language)

for placeholder in placeholders:
placeholder.clear_cache(language, site_id=self.node.site_id)
for placeholder_instance in placeholders:
placeholder_instance.clear_cache(language, site_id=self.node.site_id)

if menu:
# Clears all menu caches for this page's site
Expand Down
22 changes: 11 additions & 11 deletions cms/plugin_pool.py
< ADB4 td class="blob-code blob-code-addition js-file-line"> % plugin_class
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,24 @@ def validate_templates(self, plugin=None):
plugins = [plugin]
else:
plugins = self.plugins.values()
for plugin in plugins:
if (plugin.render_plugin and not type(plugin.render_plugin) == property
or hasattr(plugin.model, 'render_template')
or hasattr(plugin, 'get_render_template')):
if (plugin.render_template is None and not hasattr(plugin, 'get_render_template')):
for plugin_class in plugins:
if (plugin_class.render_plugin and type(plugin_class.render_plugin) is not property
or hasattr(plugin_class.model, 'render_template')
or hasattr(plugin_class, 'get_render_template')):
if (plugin_class.render_template is None and not hasattr(plugin_class, 'get_render_template')):
raise ImproperlyConfigured(
"CMS Plugins must define a render template, "
"a get_render_template method or "
"set render_plugin=False: %s" % plugin
"set render_plugin=False: %s" % plugin_class
)
# If plugin class defines get_render_template we cannot
# statically check for valid template file as it depends
# on plugin configuration and context.
# We cannot prevent developer to shoot in the users' feet
elif not hasattr(plugin, 'get_render_template'):
elif not hasattr(plugin_class, 'get_render_template'):
from django.template import loader

template = plugin.render_template
template = plugin_class.render_template
if isinstance(template, str) and template:
try:
loader.get_template(template)
Expand All @@ -85,17 +85,17 @@ def validate_templates(self, plugin=None):
if str(e) == template:
raise ImproperlyConfigured(
"CMS Plugins must define a render template (%s) that exists: %s"
% (plugin, template)
% (plugin_class, template)
)
else:
pass
except TemplateSyntaxError:
pass
else:
if plugin.allow_children:
if plugin_class.allow_children:
raise ImproperlyConfigured(
"CMS Plugins can not define render_plugin=False and allow_children=True: %s"
% plugin
)

def register_plugin(self, plugin):
Expand Down
4 changes: 2 additions & 2 deletions cms/toolbar/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ def collect_plugin_data(plugin):

tree_data.append(plugin_info)

for plugin in plugin.child_plugin_instances:
collect_plugin_data(plugin)
for plugin_instance in plugin.child_plugin_instances:
collect_plugin_data(plugin_instance)

with force_language(toolbar.toolbar_language):
for root_plugin in root_plugins:
Expand Down
Loading
0