Repository Analysis

wagtail/wagtail

A Django content management system focused on flexibility and user experience

14.5 Low AI signal View on GitHub
14.5
Adjusted Score
14.5
Raw Score
100%
Time Factor
2026-05-26
Last Push
20,332
Stars
Python
Language
397,716
Lines of Code
2270
Files
5082
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 44HIGH 117MEDIUM 195LOW 4726

Pattern Findings

5082 matches across 14 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers4251 hits · 3661 pts
SeverityFileLineSnippet
LOWwagtail/tasks.py11def update_reference_index_task(app_label, model_name, pk):
LOWwagtail/tasks.py37def delete_file_from_storage_task(deconstructed_storage, path):
LOWwagtail/fields.py299 def get_block_by_content_path(self, value, path_elements):
LOWwagtail/query.py613 def annotate_approved_schedule(self):
LOWwagtail/query.py643 def annotate_has_untranslated_locale(self):
LOWwagtail/coreutils.py285def get_supported_content_language_variant(lang_code, strict=False):
LOWwagtail/coreutils.py320def get_locales_display_names() -> dict:
LOWwagtail/coreutils.py554def make_wagtail_template_fragment_key(fragment_name, page, site, vary_on=None):
LOWwagtail/wagtail_hooks.py100 def register_workflow_permissions():
LOWwagtail/wagtail_hooks.py107 def register_task_permissions():
LOWwagtail/wagtail_hooks.py115def describe_collection_children(collection):
LOWwagtail/wagtail_hooks.py132def register_core_log_actions(actions):
LOWwagtail/wagtail_hooks.py377 def _field_label_from_content_path(model, content_path):
LOWwagtail/wagtail_hooks.py504def register_workflow_log_actions(actions):
LOWwagtail/log_actions.py148 def get_log_model_for_instance(self, instance):
LOWwagtail/signal_handlers.py23def post_save_site_signal_handler(instance, update_fields=None, **kwargs):
LOWwagtail/signal_handlers.py27def post_delete_site_signal_handler(instance, **kwargs):
LOWwagtail/signal_handlers.py31def pre_delete_page_unpublish(sender, instance, **kwargs):
LOWwagtail/signal_handlers.py38def post_delete_page_log_deletion(sender, instance, **kwargs):
LOWwagtail/signal_handlers.py42def reset_locales_display_names_cache(sender, instance, **kwargs):
LOWwagtail/signal_handlers.py50def disable_reference_index_auto_update():
LOWwagtail/signal_handlers.py66def update_reference_index_on_save(instance, **kwargs):
LOWwagtail/signal_handlers.py79def remove_reference_index_on_delete(instance, **kwargs):
LOWwagtail/signal_handlers.py88def connect_reference_index_signal_handlers_for_model(model):
LOWwagtail/signal_handlers.py93def connect_reference_index_signal_handlers(**kwargs):
LOWwagtail/signal_handlers.py98def disconnect_reference_index_signal_handlers_for_model(model):
LOWwagtail/signal_handlers.py103def disconnect_reference_index_signal_handlers(**kwargs):
LOWwagtail/views.py35def authenticate_with_password(request, page_view_restriction_id, page_id):
LOWwagtail/blocks/list_block.py200 def defer_required_validation(self):
LOWwagtail/blocks/list_block.py251 def restore_deferred_validation(self):
LOWwagtail/blocks/list_block.py411 def get_block_by_content_path(self, value, path_elements):
LOWwagtail/blocks/struct_block.py151 def unique_children_and_settings(self):
LOWwagtail/blocks/struct_block.py305 def defer_required_validation(self):
LOWwagtail/blocks/struct_block.py324 def restore_deferred_validation(self):
LOWwagtail/blocks/struct_block.py441 def get_block_by_content_path(self, value, path_elements):
LOWwagtail/blocks/stream_block.py164 def defer_required_validation(self):
LOWwagtail/blocks/stream_block.py241 def restore_deferred_validation(self):
LOWwagtail/blocks/stream_block.py427 def get_block_by_content_path(self, value, path_elements):
LOWwagtail/blocks/stream_block.py818 def _deserialize_pickle_value(app_label, model_name, field_name, field_value):
LOWwagtail/blocks/base.py175 def defer_required_validation(self):
LOWwagtail/blocks/base.py199 def restore_deferred_validation(self):
LOWwagtail/blocks/base.py435 def get_block_by_content_path(self, value, path_elements):
LOWwagtail/blocks/field_block.py65 def defer_required_validation(self):
LOWwagtail/blocks/field_block.py76 def restore_deferred_validation(self):
LOWwagtail/templatetags/wagtailcore_tags.py87def wagtail_documentation_path():
LOWwagtail/templatetags/wagtailcore_tags.py96def wagtail_release_notes_path():
LOWwagtail/templatetags/wagtailcore_tags.py101def wagtail_feature_release_whats_new_link():
LOWwagtail/templatetags/wagtailcore_tags.py109def wagtail_feature_release_editor_guide_link():
LOWwagtail/snippets/models.py38def get_workflow_enabled_models():
LOWwagtail/snippets/models.py84def _register_snippet_immediately(registerable, viewset=None):
LOWwagtail/snippets/models.py113def register_deferred_snippets():
LOWwagtail/snippets/wagtail_hooks.py36def register_snippets_menu_item():
LOWwagtail/snippets/action_menu.py242def get_base_snippet_action_menu_items(model):
LOWwagtail/snippets/permissions.py13def user_can_edit_snippet_type(user, model):
LOWwagtail/snippets/tests/test_unpublish_view.py36 def test_unpublish_view_invalid_pk(self):
LOWwagtail/snippets/tests/test_unpublish_view.py51 def test_unpublish_view_get_bad_permissions(self):
LOWwagtail/snippets/tests/test_unpublish_view.py70 def test_unpublish_view_post_bad_permissions(self):
LOWwagtail/snippets/tests/test_unpublish_view.py104 def test_unpublish_view_post_with_publish_permission(self):
LOWwagtail/snippets/tests/test_unpublish_view.py195 def test_after_unpublish_hook(self):
LOWwagtail/snippets/tests/test_chooser_block.py34 def test_reference_model_by_string(self):
4191 more matches not shown…
Self-Referential Comments180 hits · 546 pts
SeverityFileLineSnippet
MEDIUMwagtail/fields.py275 # This method is used for serialization using django.core.serializers,
MEDIUMwagtail/snippets/tests/test_history_view.py173 # Create a new revision with a new isolated context
MEDIUMwagtail/snippets/tests/test_history_view.py179 # Create a new log context for each iteration to simulate multiple
MEDIUMwagtail/snippets/tests/test_usage.py108 # Create a user with basic admin backend access
MEDIUMwagtail/snippets/tests/test_usage.py133 # Create a user with edit access to snippets but not pages
MEDIUMwagtail/snippets/tests/test_permissions.py16 # Create a user with add_advert permission but not change_advert
MEDIUMwagtail/snippets/tests/test_permissions.py70 # Create a user with change_advert permission but not add_advert
MEDIUMwagtail/snippets/tests/test_permissions.py124 # Create a user with delete_advert permission
MEDIUMwagtail/permission_policies/pages.py178 # This method is used all around the admin,
MEDIUMwagtail/test/dummy_external_storage.py1# This file contains a file storage backend that imitates behaviours of
MEDIUMwagtail/test/utils/wagtail_tests.py22 # Create a user
MEDIUMwagtail/test/utils/wagtail_factories/builder.py115 # Create a new StreamBlockFactory subclass, with a declaration for each block the user
MEDIUMwagtail/images/models.py455 # Create a bounding box around all faces
MEDIUMwagtail/images/models.py464 # Create a bounding box around all features
MEDIUMwagtail/images/tests/test_jinja2_svg.py17 # Create a real test engine
MEDIUMwagtail/images/tests/test_jinja2_svg.py22 # Create a raster image
MEDIUMwagtail/images/tests/test_jinja2_svg.py28 # Create an SVG image
MEDIUMwagtail/images/tests/utils.py76 # Create an image with a missing file, by deserializing from a python object
MEDIUMwagtail/images/tests/test_models.py73 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_models.py212 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_models.py319 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_models.py390 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_models.py476 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_models.py573 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_models.py1285 # Create an image with a big filename and focal point
MEDIUMwagtail/images/tests/test_models.py1341 # Create an image to edit
MEDIUMwagtail/images/tests/test_models.py1423 # Create an image
MEDIUMwagtail/images/tests/test_models.py1453 # Create an image with a big filename and no extension
MEDIUMwagtail/images/tests/test_models.py1470 # Create an image with a big filename and extensions
MEDIUMwagtail/images/tests/test_admin_views.py1407 # Create an image to edit
MEDIUMwagtail/images/tests/test_admin_views.py1768 # Create an image to edit
MEDIUMwagtail/images/tests/test_admin_views.py1801 # Create an image to edit
MEDIUMwagtail/images/tests/test_admin_views.py1830 # Create an image to edit
MEDIUMwagtail/images/tests/test_admin_views.py1932 # Create an image to edit
MEDIUMwagtail/images/tests/test_admin_views.py1993 # Create a user with change_image permission but not add_image
MEDIUMwagtail/images/tests/test_admin_views.py2025 # Create a user with add_image permission but not change_image
MEDIUMwagtail/images/tests/test_admin_views.py2154 # Create a new user in the Bakers group, and log in as them.
MEDIUMwagtail/images/tests/test_admin_views.py2388 # Create an image to edit
MEDIUMwagtail/images/tests/test_admin_views.py2436 # Create an image to edit
MEDIUMwagtail/images/tests/test_admin_views.py2481 # Create an image to edit
MEDIUMwagtail/images/tests/test_admin_views.py2946 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_admin_views.py3481 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_admin_views.py3762 # Create an UploadedFile for running tests on
MEDIUMwagtail/images/tests/test_admin_views.py3993 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_admin_views.py4192 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_admin_views.py4547 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_admin_views.py4618 # Create an image to edit
MEDIUMwagtail/images/tests/test_admin_views.py4624 # Create a user with change_image permission but not add_image
MEDIUMwagtail/images/tests/tests.py339 # Create an image for running tests on
MEDIUMwagtail/images/tests/tests.py50 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_templatetags.py22 # Create an image for running tests on
MEDIUMwagtail/images/tests/test_templatetags.py138 # Create an image for running tests on
MEDIUM…tests/test_bulk_actions/test_bulk_add_to_collection.py110 # Create a group with image permissions on the source collection only
MEDIUM…management/commands/wagtail_update_image_renditions.py84 # Create a new one
MEDIUMwagtail/tests/test_page_queryset.py532 # Create a translation of the homepage
MEDIUMwagtail/tests/test_page_queryset.py558 # Create a translation of the homepage
MEDIUMwagtail/tests/test_page_queryset.py1025 # Create a ContentType that doesn't correspond to a real model
MEDIUMwagtail/tests/test_signals.py113 # Create a subpage
MEDIUMwagtail/tests/test_blocks.py2837 # Create a deep copy of the parent's form layout to include the
MEDIUMwagtail/tests/test_page_model.py3759 # Create a page that does not have the default init
120 more matches not shown…
Hallucination Indicators44 hits · 440 pts
SeverityFileLineSnippet
CRITICALwagtail/fields.py4from django.core.exceptions import ValidationError
CRITICALwagtail/blocks/list_block.py5from django.core.exceptions import ValidationError
CRITICALwagtail/blocks/struct_block.py6from django.core.exceptions import ValidationError
CRITICALwagtail/blocks/stream_block.py8from django.core.exceptions import ValidationError
CRITICALwagtail/test/testapp/models.py12from django.core.exceptions import ValidationError
CRITICALwagtail/test/demosite/models.py3from django.core.exceptions import ValidationError
CRITICALwagtail/images/fields.py6from django.core.exceptions import ValidationError
CRITICALwagtail/images/blocks.py2from django.core.exceptions import ValidationError
CRITICALwagtail/tests/test_sites.py1from django.core.exceptions import ValidationError
CRITICALwagtail/tests/test_blocks.py11from django.core.exceptions import ValidationError
CRITICALwagtail/tests/test_audit_log.py7from django.core.exceptions import ValidationError
CRITICALwagtail/tests/test_date_validators.py4from django.core.exceptions import ValidationError
CRITICALwagtail/tests/test_workflow.py8from django.core.exceptions import ValidationError
CRITICALwagtail/admin/forms/tags.py1from django.core.exceptions import ValidationError
CRITICALwagtail/admin/forms/collections.py6from django.core.exceptions import ValidationError
CRITICALwagtail/admin/panels/title_field_panel.py59 self.bound_field.field.widget.attrs.update(**self.get_attrs())
CRITICALwagtail/admin/api/actions/delete.py1from django.core.exceptions import ValidationError as DjangoValidationError
CRITICALwagtail/admin/api/actions/create_alias.py1from django.core.exceptions import ValidationError as DjangoValidationError
CRITICALwagtail/admin/api/actions/convert_alias.py1from django.core.exceptions import ValidationError as DjangoValidationError
CRITICALwagtail/admin/api/actions/copy.py1from django.core.exceptions import ValidationError as DjangoValidationError
CRITICALwagtail/admin/api/actions/unpublish.py1from django.core.exceptions import ValidationError as DjangoValidationError
CRITICALwagtail/admin/api/actions/move.py1from django.core.exceptions import ValidationError as DjangoValidationError
CRITICALwagtail/admin/api/actions/revert_to_page_revision.py1from django.core.exceptions import ValidationError as DjangoValidationError
CRITICALwagtail/admin/api/actions/copy_for_translation.py1from django.core.exceptions import ValidationError as DjangoValidationError
CRITICALwagtail/admin/api/actions/publish.py1from django.core.exceptions import ValidationError as DjangoValidationError
CRITICALwagtail/admin/views/editing_sessions.py6from django.core.exceptions import ValidationError
CRITICALwagtail/admin/views/reports/aging_pages.py3from django.core.exceptions import ValidationError
CRITICALwagtail/admin/telepath/widgets.py8from django.core.exceptions import ValidationError
CRITICALwagtail/models/sites.py7from django.core.exceptions import ValidationError
CRITICALwagtail/models/audit_log.py13from django.core.exceptions import ValidationError
CRITICALwagtail/contrib/forms/tests/test_models.py2from django.core.exceptions import ValidationError
CRITICALwagtail/contrib/typed_table_block/tests.py1from django.core.exceptions import ValidationError
CRITICALwagtail/contrib/typed_table_block/blocks.py2from django.core.exceptions import ValidationError
CRITICALwagtail/contrib/table_block/blocks.py4from django.core.exceptions import ValidationError
CRITICALwagtail/api/v2/filters.py2from django.core.exceptions import FieldError
CRITICALwagtail/documents/models.py7from django.core.exceptions import ValidationError
CRITICALwagtail/documents/fields.py2from django.core.exceptions import ValidationError
CRITICALwagtail/documents/tests/test_document_field.py1from django.core.exceptions import ValidationError
CRITICALwagtail/embeds/blocks.py1from django.core.exceptions import ValidationError
CRITICALwagtail/embeds/tests/test_embeds.py10from django.core.exceptions import ValidationError
CRITICALdocs/advanced_topics/streamfield_validation.md17from django.core.exceptions import ValidationError
CRITICALdocs/advanced_topics/streamfield_validation.md50from django.core.exceptions import ValidationError
CRITICALdocs/advanced_topics/streamfield_validation.md69from django.core.exceptions import ValidationError
CRITICALdocs/reference/contrib/typed_table_block.md82from django.core.exceptions import ValidationError
Cross-File Repetition85 hits · 425 pts
SeverityFileLineSnippet
HIGHwagtail/fields.py0given a list of elements from a content path, retrieve the block at that path as a boundblock object, or none if the pat
HIGHwagtail/blocks/list_block.py0given a list of elements from a content path, retrieve the block at that path as a boundblock object, or none if the pat
HIGHwagtail/blocks/struct_block.py0given a list of elements from a content path, retrieve the block at that path as a boundblock object, or none if the pat
HIGHwagtail/blocks/stream_block.py0given a list of elements from a content path, retrieve the block at that path as a boundblock object, or none if the pat
HIGHwagtail/blocks/base.py0given a list of elements from a content path, retrieve the block at that path as a boundblock object, or none if the pat
HIGHwagtail/snippets/tests/test_unpublish_view.py0this tests that the unpublish view responds with an unpublish confirm page
HIGHwagtail/admin/tests/pages/test_unpublish_page.py0this tests that the unpublish view responds with an unpublish confirm page
HIGH…n/tests/pages/test_bulk_actions/test_bulk_unpublish.py0this tests that the unpublish view responds with an unpublish confirm page
HIGHwagtail/snippets/tests/test_unpublish_view.py0this tests that the unpublish view doesn't allow users without unpublish permissions
HIGHwagtail/snippets/tests/test_unpublish_view.py0this tests that the unpublish view doesn't allow users without unpublish permissions
HIGHwagtail/admin/tests/pages/test_unpublish_page.py0this tests that the unpublish view doesn't allow users without unpublish permissions
HIGH…n/tests/pages/test_bulk_actions/test_bulk_unpublish.py0this tests that the unpublish view doesn't allow users without unpublish permissions
HIGHwagtail/snippets/tests/test_create_view.py0template[data-controller="w-teleport"][data-w-teleport-target-value="[data-edit-form]"] #schedule-publishing-dialog
HIGHwagtail/snippets/tests/test_edit_view.py0template[data-controller="w-teleport"][data-w-teleport-target-value="[data-edit-form]"] #schedule-publishing-dialog
HIGHwagtail/admin/tests/pages/test_edit_page.py0template[data-controller="w-teleport"][data-w-teleport-target-value="[data-edit-form]"] #schedule-publishing-dialog
HIGHwagtail/snippets/tests/test_create_view.py0if a form is reshown due to a validation error elsewhere, fields whose validation was deferred should still show the req
HIGHwagtail/snippets/tests/test_edit_view.py0if a form is reshown due to a validation error elsewhere, fields whose validation was deferred should still show the req
HIGHwagtail/admin/tests/pages/test_edit_page.py0if a form is reshown due to a validation error elsewhere, fields whose validation was deferred should still show the req
HIGHwagtail/admin/tests/pages/test_create_page.py0if a form is reshown due to a validation error elsewhere, fields whose validation was deferred should still show the req
HIGHwagtail/permission_policies/collections.py0return whether the given user has permission to perform the given action on some or all instances of this model
HIGHwagtail/permission_policies/collections.py0return whether the given user has permission to perform the given action on some or all instances of this model
HIGHwagtail/permission_policies/base.py0return whether the given user has permission to perform the given action on some or all instances of this model
HIGHwagtail/permission_policies/collections.py0return whether the given user has permission to perform any of the given actions on some or all instances of this model
HIGHwagtail/permission_policies/sites.py0return whether the given user has permission to perform any of the given actions on some or all instances of this model
HIGHwagtail/permission_policies/base.py0return whether the given user has permission to perform any of the given actions on some or all instances of this model
HIGHwagtail/permission_policies/collections.py0return a queryset of users who have permission to perform any of the given actions on some or all instances of this mode
HIGHwagtail/permission_policies/collections.py0return a queryset of users who have permission to perform any of the given actions on some or all instances of this mode
HIGHwagtail/permission_policies/sites.py0return a queryset of users who have permission to perform any of the given actions on some or all instances of this mode
HIGHwagtail/permission_policies/base.py0return a queryset of users who have permission to perform any of the given actions on some or all instances of this mode
HIGHwagtail/permission_policies/collections.py0return whether the given user has permission to perform the given action on the given model instance
HIGHwagtail/permission_policies/collections.py0return whether the given user has permission to perform the given action on the given model instance
HIGHwagtail/permission_policies/base.py0return whether the given user has permission to perform the given action on the given model instance
HIGHwagtail/permission_policies/collections.py0return whether the given user has permission to perform any of the given actions on the given model instance
HIGHwagtail/permission_policies/collections.py0return whether the given user has permission to perform any of the given actions on the given model instance
HIGHwagtail/permission_policies/base.py0return whether the given user has permission to perform any of the given actions on the given model instance
HIGHwagtail/permission_policies/collections.py0return a queryset of all instances of this model for which the given user has permission to perform any of the given act
HIGHwagtail/permission_policies/sites.py0return a queryset of all instances of this model for which the given user has permission to perform any of the given act
HIGHwagtail/permission_policies/base.py0return a queryset of all instances of this model for which the given user has permission to perform any of the given act
HIGHwagtail/permission_policies/collections.py0return a queryset of all users who have permission to perform any of the given actions on the given model instance
HIGHwagtail/permission_policies/collections.py0return a queryset of all users who have permission to perform any of the given actions on the given model instance
HIGHwagtail/permission_policies/base.py0return a queryset of all users who have permission to perform any of the given actions on the given model instance
HIGHwagtail/images/tests/test_admin_views.py0this tests that the add view responds correctly on a get request
HIGHwagtail/images/tests/test_admin_views.py0this tests that the add view responds correctly on a get request
HIGHwagtail/images/tests/test_admin_views.py0this tests that the add view responds correctly on a get request
HIGHwagtail/documents/tests/test_admin_views.py0this tests that the add view responds correctly on a get request
HIGHwagtail/images/tests/test_admin_views.py0the add view must check that the uploaded file is a valid image
HIGHwagtail/images/tests/test_admin_views.py0the add view must check that the uploaded file is a valid image
HIGHwagtail/images/tests/test_admin_views.py0the add view must check that the uploaded file is a valid image
HIGHwagtail/images/tests/test_templatetags.py0<picture> <source srcset="{filename_webp}" type="image/webp"> <img src="{filename_jpeg}" alt="test image" width="640" he
HIGHwagtail/images/tests/test_templatetags.py0<picture> <source srcset="{filename_webp}" type="image/webp"> <img src="{filename_jpeg}" alt="test image" width="640" he
HIGHwagtail/images/tests/test_jinja2.py0<picture> <source srcset="{filename_webp}" type="image/webp"> <img src="{filename_jpeg}" alt="test image" width="640" he
HIGHwagtail/images/tests/test_jinja2.py0<picture> <source srcset="{filename_webp}" type="image/webp"> <img src="{filename_jpeg}" alt="test image" width="640" he
HIGHwagtail/tests/test_page_model.py0test that view restrictions on a page's ancestor are not copied along with the page
HIGHwagtail/tests/test_page_model.py0test that view restrictions on a page's ancestor are not copied along with the page
HIGHwagtail/tests/test_page_model.py0test that view restrictions on a page's ancestor are not copied along with the page
HIGHwagtail/tests/test_page_model.py0test that view restrictions on a page's ancestor are not copied along with the page
HIGHwagtail/tests/tests.py0{% load wagtailcore_tags %}<a href="{% pageurl page %}">{{ page.title }}</a>
HIGHwagtail/tests/tests.py0{% load wagtailcore_tags %}<a href="{% pageurl page %}">{{ page.title }}</a>
HIGHwagtail/tests/tests.py0{% load wagtailcore_tags %}<a href="{% pageurl page %}">{{ page.title }}</a>
HIGHwagtail/tests/tests.py0{% load wagtailcore_tags %}<a href="{% pageurl page %}">{{ page.title }}</a>
25 more matches not shown…
Cross-Language Confusion32 hits · 212 pts
SeverityFileLineSnippet
HIGHwagtail/tasks.py28 # parent is null, so there is no valid object to record references against
HIGH…/tests/permission_policies/test_permission_policies.py577 # in order for user_has_any_permission to return true
HIGH…/tests/permission_policies/test_permission_policies.py591 # should return false
HIGH…/tests/permission_policies/test_permission_policies.py703 # in order for user_has_any_permission to return true
HIGH…/tests/permission_policies/test_permission_policies.py716 # should return false
HIGH…/tests/permission_policies/test_permission_policies.py967 # in order for user_has_any_permission to return true
HIGH…/tests/permission_policies/test_permission_policies.py978 # should return false
HIGH…/tests/permission_policies/test_permission_policies.py1176 # in order for user_has_any_permission to return true
HIGH…/tests/permission_policies/test_permission_policies.py1189 # should return false
HIGHwagtail/admin/wagtail_hooks.py722 # Keep pasted links with http/https protocol, and not-pasted links (href = undefined).
HIGHwagtail/admin/userbar.py215 # The runOnly has to be omitted (instead of set to an empty list or null)
HIGHwagtail/admin/panels/field_panel.py64 # - it corresponds to a non-null, non-text-typed model field (in which case a blank value
HIGHwagtail/admin/tests/test_edit_handlers.py1221 expected_js = 'new PageChooser("{id}", {{"modelNames": ["{model}"], "canChooseRoot": false, "userPerms": null, "
HIGHwagtail/admin/tests/test_edit_handlers.py1243 expected_js = 'new PageChooser("{id}", {{"modelNames": ["{model}"], "canChooseRoot": true, "userPerms": null, "m
HIGHwagtail/admin/tests/test_edit_handlers.py1299 expected_js = 'new PageChooser("{id}", {{"modelNames": ["{model}"], "canChooseRoot": false, "userPerms": null, "
HIGHwagtail/admin/tests/test_edit_handlers.py1319 expected_js = 'new PageChooser("{id}", {{"modelNames": ["{model}"], "canChooseRoot": false, "userPerms": null, "
HIGHwagtail/admin/tests/test_widgets.py108 'new PageChooser("test-id", {"modelNames": ["wagtailcore.page"], "canChooseRoot": false, "userPerms": null,
HIGHwagtail/admin/tests/test_widgets.py118 'new PageChooser("test-id", {"modelNames": ["tests.simplepage"], "canChooseRoot": false, "userPerms": null,
HIGHwagtail/admin/tests/test_widgets.py130 'new PageChooser("test-id", {"modelNames": ["tests.simplepage"], "canChooseRoot": false, "userPerms": null,
HIGHwagtail/admin/tests/test_widgets.py142 'new PageChooser("test-id", {"modelNames": ["tests.simplepage"], "canChooseRoot": false, "userPerms": null,
HIGHwagtail/admin/tests/test_widgets.py155 'new PageChooser("test-id", {"modelNames": ["tests.simplepage", "tests.eventpage"], "canChooseRoot": false,
HIGHwagtail/admin/tests/test_widgets.py167 'new PageChooser("test-id", {"modelNames": ["wagtailcore.page"], "canChooseRoot": true, "userPerms": null, "
HIGHwagtail/admin/tests/test_widgets.py82 'new PageChooser("test-id", {"modelNames": ["wagtailcore.page"], "canChooseRoot": false, "userPerms": null,
HIGH…ail/admin/rich_text/converters/html_to_contentstate.py89 state.push()
HIGHwagtail/admin/views/generic/models.py109 # is returned anyway (even if list_filter is undefined), so the locale
HIGHwagtail/management/commands/convert_mariadb_uuids.py25 old_field = models.CharField(null=null, max_length=36)
HIGHwagtail/management/commands/convert_mariadb_uuids.py28 new_field = models.UUIDField(null=null)
HIGHwagtail/models/pages.py389 # If non-null, this page is an alias of the linked page
HIGHwagtail/models/pages.py1890 # fall back on latest_revision_created_at if last_published_at is null
HIGHwagtail/contrib/settings/models.py77 If the field value is null, or links to something other
HIGHwagtail/contrib/table_block/tests.py340 expected_json = '{"first_row_is_table_header": false, "first_col_is_header": false, "data": [["Foo", 1, null], [
HIGHwagtail/contrib/sitemaps/sitemap_generator.py17 # fall back on latest_revision_created_at if last_published_at is null
Unused Imports247 hits · 207 pts
SeverityFileLineSnippet
LOWwagtail/compat.py19
LOWwagtail/coreutils.py29
LOWwagtail/apps.py4
LOWwagtail/wagtail_hooks.py22
LOWwagtail/blocks/__init__.py2
LOWwagtail/blocks/__init__.py3
LOWwagtail/blocks/__init__.py4
LOWwagtail/blocks/__init__.py5
LOWwagtail/blocks/__init__.py6
LOWwagtail/blocks/__init__.py7
LOWwagtail/snippets/bulk_actions/__init__.py1
LOWwagtail/locales/views.py18
LOWwagtail/locales/views.py18
LOWwagtail/permission_policies/__init__.py1
LOWwagtail/test/settings_ui.py1
LOWwagtail/test/customuser/models.py13
LOWwagtail/test/customuser/models.py15
LOWwagtail/test/utils/__init__.py1
LOWwagtail/test/utils/__init__.py2
LOWwagtail/test/utils/__init__.py3
LOWwagtail/test/utils/wagtail_factories/__init__.py1
LOWwagtail/test/utils/wagtail_factories/__init__.py2
LOWwagtail/images/models.py1
LOWwagtail/images/apps.py5
LOWwagtail/images/tests/tests.py41
LOWwagtail/images/views/bulk_actions/__init__.py1
LOWwagtail/images/views/bulk_actions/__init__.py2
LOWwagtail/images/views/bulk_actions/__init__.py3
LOWwagtail/admin/models.py15
LOWwagtail/admin/apps.py4
LOWwagtail/admin/apps.py18
LOWwagtail/admin/blocks.py3
LOWwagtail/admin/ui/components.py2
LOWwagtail/admin/ui/components.py2
LOWwagtail/admin/forms/__init__.py2
LOWwagtail/admin/forms/__init__.py2
LOWwagtail/admin/forms/__init__.py2
LOWwagtail/admin/forms/__init__.py2
LOWwagtail/admin/forms/__init__.py2
LOWwagtail/admin/forms/__init__.py9
LOWwagtail/admin/panels/__init__.py4
LOWwagtail/admin/panels/__init__.py4
LOWwagtail/admin/panels/__init__.py9
LOWwagtail/admin/panels/__init__.py10
LOWwagtail/admin/panels/__init__.py11
LOWwagtail/admin/panels/__init__.py12
LOWwagtail/admin/panels/__init__.py13
LOWwagtail/admin/panels/__init__.py14
LOWwagtail/admin/panels/__init__.py15
LOWwagtail/admin/panels/__init__.py16
LOWwagtail/admin/panels/__init__.py17
LOWwagtail/admin/panels/__init__.py18
LOWwagtail/admin/panels/__init__.py19
LOWwagtail/admin/panels/__init__.py20
LOWwagtail/admin/panels/__init__.py21
LOWwagtail/admin/rich_text/__init__.py4
LOWwagtail/admin/views/bulk_action/__init__.py1
LOWwagtail/admin/views/bulk_action/__init__.py2
LOWwagtail/admin/views/generic/__init__.py1
LOWwagtail/admin/views/generic/__init__.py1
187 more matches not shown…
Deep Nesting110 hits · 106 pts
SeverityFileLineSnippet
LOWruntests.py37
LOWwagtail/fields.py143
LOWwagtail/query.py656
LOWwagtail/whitelist.py34
LOWwagtail/whitelist.py46
LOWwagtail/coreutils.py285
LOWwagtail/coreutils.py347
LOWwagtail/wagtail_hooks.py33
LOWwagtail/wagtail_hooks.py34
LOWwagtail/blocks/struct_block.py37
LOWwagtail/blocks/stream_block.py36
LOWwagtail/blocks/field_block.py604
LOWwagtail/blocks/field_block.py658
LOWwagtail/blocks/field_block.py717
LOWwagtail/snippets/action_menu.py275
LOWwagtail/snippets/views/snippets.py191
LOWwagtail/permission_policies/collections.py292
LOWwagtail/permission_policies/base.py386
LOWwagtail/test/numberformat.py78
LOWwagtail/test/utils/form_data.py147
LOWwagtail/bin/wagtail.py203
LOWwagtail/bin/wagtail.py331
LOWwagtail/bin/wagtail.py354
LOWwagtail/images/models.py650
LOWwagtail/images/models.py1056
LOWwagtail/images/templatetags/wagtailimages_tags.py15
LOW…management/commands/wagtail_update_image_renditions.py40
LOWwagtail/tests/test_page_queryset.py593
LOWwagtail/tests/test_blocks.py70
LOWwagtail/tests/test_hooks.py125
LOWwagtail/tests/streamfield_migrations/test_migrations.py51
LOWwagtail/admin/mail.py231
LOWwagtail/admin/models.py30
LOWwagtail/admin/checks.py105
LOWwagtail/admin/localization.py121
LOWwagtail/admin/wagtail_hooks.py308
LOWwagtail/admin/action_menu.py274
LOWwagtail/admin/messages.py38
LOWwagtail/admin/userbar.py339
LOWwagtail/admin/compare.py98
LOWwagtail/admin/compare.py798
LOWwagtail/admin/compare.py280
LOWwagtail/admin/compare.py447
LOWwagtail/admin/compare.py493
LOWwagtail/admin/compare.py543
LOWwagtail/admin/compare.py776
LOWwagtail/admin/filters.py165
LOWwagtail/admin/forms/models.py190
LOWwagtail/admin/viewsets/model.py516
LOWwagtail/admin/panels/model_utils.py56
LOWwagtail/admin/panels/group.py27
LOWwagtail/admin/tests/pages/test_page_search.py344
LOWwagtail/admin/views/editing_sessions.py20
LOWwagtail/admin/views/collection_privacy.py11
LOWwagtail/admin/views/chooser.py604
LOWwagtail/admin/views/page_privacy.py14
LOWwagtail/admin/views/workflows.py867
LOWwagtail/admin/views/account.py305
LOWwagtail/admin/views/generic/mixins.py456
LOWwagtail/admin/views/generic/models.py167
50 more matches not shown…
Redundant / Tautological Comments32 hits · 51 pts
SeverityFileLineSnippet
LOWwagtail/blocks/definition_lookup.py72 # Check if we've already seen this block definition
LOWwagtail/snippets/tests/test_reordering.py243 # Check if obj3 is now the first item by taking obj1's sort_order and
LOWwagtail/snippets/tests/test_reordering.py253 # Check if obj1 is now the second item by taking obj2's sort_order
LOWwagtail/snippets/tests/test_reordering.py317 # Check if obj1 is now the second item by taking obj2's sort_order
LOWwagtail/images/models.py182 # Open file if it is closed
LOWwagtail/images/models.py753 # Read file contents into memory
LOWwagtail/images/models.py977 # Check if segment has braces to expand
LOWwagtail/images/forms.py26 # Check if this is the file field
LOWwagtail/images/tests/test_models.py890 # Check if get_rendition returns the rendition from cache
LOWwagtail/tests/test_reference_index.py942 # Check if reference remains (pointing to dead target)
LOWwagtail/tests/test_management_commands.py67 # Check if its fixed
LOWwagtail/tests/test_management_commands.py91 # Check if its fixed
LOWwagtail/admin/tests/test_account_management.py378 # Check if the default title does not exist
LOWwagtail/admin/tests/test_account_management.py308 # Check if the default title exists
LOWwagtail/admin/tests/viewsets/test_model_viewset.py2107 # Check if obj3 is now the first item by taking obj1's sort_order and
LOWwagtail/admin/tests/viewsets/test_model_viewset.py2116 # Check if obj1 is now the second item by taking obj2's sort_order
LOWwagtail/admin/tests/viewsets/test_model_viewset.py2168 # Check if obj1 is now the second item by taking obj2's sort_order
LOWwagtail/admin/tests/pages/test_copy_page.py1091 # Check if slug is hello-world-2
LOWwagtail/admin/views/workflows.py491 # Set workflow to active if inactive
LOWwagtail/admin/views/workflows.py822 # Set workflow to active if inactive
LOWwagtail/admin/views/pages/copy.py35 # Check if user is submitting
LOWwagtail/models/pages.py786 # Check if this is a root page of any sites and clear the 'wagtail_site_root_paths' key if so
LOWwagtail/models/i18n.py345 # Check if the object has any parental keys to another translatable model
LOWwagtail/contrib/settings/models.py207 # Check if we already have this in the cache and return it if so.
LOWwagtail/contrib/frontend_cache/signal_handlers.py20 # Loop through list and register signal handlers for each one
LOWwagtail/contrib/simple_translation/models.py37 # Check if the source tree needs to be synchronised into any other trees
LOW…contrib/simple_translation/tests/test_wagtail_hooks.py239 # Check if fr and de blog post parent ids are in the translated list
LOW…contrib/simple_translation/tests/test_wagtail_hooks.py265 # Check if the new pages exist under their respective translated homepages
LOW…contrib/simple_translation/tests/test_wagtail_hooks.py324 # Check if the fr and de pages exist under their original parent page (/blog/)
LOWwagtail/api/v2/views.py542 # Check if we have a specific site to look for
LOWwagtail/documents/models.py94 # Open file if it is closed
LOWwagtail/embeds/finders/oembed.py69 # Check if 'type' is missing
Over-Commented Block34 hits · 32 pts
SeverityFileLineSnippet
LOWruff.toml21# E: pycodestyle errors
LOWwagtail/signals.py61
LOWwagtail/fields.py221 ):
LOWwagtail/blocks/list_block.py21
LOWwagtail/blocks/base.py601 # surname = CharBlock()
LOWwagtail/snippets/apps.py21 # created manually.
LOWwagtail/snippets/bulk_actions/delete.py21
LOWwagtail/permission_policies/collections.py301 # on any instance
LOWwagtail/tests/test_blocks.py5661 # This is a good thing for a standalone to_python call, because loading a model instance
LOWwagtail/admin/templatetags/wagtailadmin_tags.py221 request = context.get("request")
LOWwagtail/admin/tests/test_audit_log.py221 # 3 edits without UUID
LOWwagtail/admin/tests/test_menu.py421 # automatically generated from the label, which is translatable.
LOWwagtail/admin/tests/test_editing_sessions.py1721
LOWwagtail/admin/tests/pages/test_page_viewset.py81 BaseParent,
LOWwagtail/admin/views/editing_sessions.py161 and not users_other_session["revision_id"]
LOWwagtail/admin/views/generic/multiple_upload.py21
LOWwagtail/models/pages.py361
LOWwagtail/models/reference_index.py161 # called 'my_struct_block' that has a field called 'my_field'. If we extracted a
LOWwagtail/models/reference_index.py901# Ignore relations formed by any django-taggit 'through' model, as this causes any tag attached to
LOWwagtail/rich_text/feature_registry.py21 # of feature names to 'plugin' objects that define how to implement that feature
LOWdocs/conf.py1#
LOWdocs/conf.py141# There are two options for replacing |today|: either, you set today to some
LOWdocs/conf.py221}
LOWdocs/conf.py241# A shorter title for the navigation bar. Default is the same as html_title.
LOWdocs/conf.py261html_extra_path = ["public"]
LOWdocs/conf.py281# If false, no index is generated.
LOWdocs/conf.py301# base URL from which the finished HTML is served.
LOWdocs/conf.py341# For "manual" documents, if this is true, then toplevel headings are parts,
LOWdocs/advanced_topics/add_to_django_project.md321 }
LOW.github/workflows/test.yml21
LOWclient/scss/components/_preview-panel.scss41 // Ensure that sites without a background show with a fallback, only when iframe has loaded
LOWclient/src/components/Sidebar/menu/SubMenuItem.tsx41 // to finish before making it invisible
LOW…/src/components/StreamField/blocks/StructBlock.test.js921 // group(root):
LOW…ypoints/contrib/typed_table_block/typed_table_block.js21 // * id: the unique ID number assigned to this column, used in field name prefixes
Excessive Try-Catch Wrapping26 hits · 32 pts
SeverityFileLineSnippet
MEDIUMsetup.py12 print("Error compiling assets: " + str(e)) # noqa: T201
LOWwagtail/blocks/base.py718 except Exception as e: # noqa: BLE001
MEDIUMwagtail/blocks/base.py710def
LOWwagtail/test/dummy_external_storage.py88 except Exception as e: # noqa: BLE001
MEDIUMwagtail/test/dummy_external_storage.py85def size(self):
LOWwagtail/test/utils/page_tests.py260 except Exception as e: # noqa: BLE001
LOWwagtail/test/utils/page_tests.py336 except Exception as e: # noqa: BLE001
LOWwagtail/test/utils/page_tests.py367 except Exception as e: # noqa: BLE001
LOWwagtail/test/utils/page_tests.py422 except Exception as e: # noqa: BLE001
LOWwagtail/test/utils/page_tests.py438 except Exception as e: # noqa: BLE001
LOWwagtail/test/utils/decorators.py22 except Exception as e: # noqa: BLE001
LOWwagtail/images/models.py168 except Exception as e: # noqa: BLE001
LOWwagtail/images/fields.py186 except Exception as exc: # noqa: BLE001
MEDIUMwagtail/images/fields.py120def check_image_pixel_size(self, f):
LOWwagtail/images/tests/test_management_commands.py41 except Exception: # noqa: BLE001
MEDIUMwagtail/tests/test_utils.py180def test_pickleability(self):
LOWwagtail/tests/test_utils.py183 except Exception as e: # noqa: BLE001
LOWwagtail/tests/test_utils.py190 except Exception as e: # noqa: BLE001
LOWwagtail/admin/mail.py126 except Exception:
LOWwagtail/admin/mail.py269 except Exception:
LOW…nagement/commands/create_log_entries_from_revisions.py48 except Exception: # noqa: BLE001
LOW…nagement/commands/create_log_entries_from_revisions.py60 except Exception: # noqa: BLE001
LOW…ail/contrib/settings/tests/site_specific/test_model.py83 except Exception as e: # noqa: BLE001
LOW…ail/contrib/settings/tests/site_specific/test_model.py91 except Exception as e: # noqa: BLE001
LOWwagtail/contrib/redirects/views.py270 except Exception as e: # noqa: BLE001 ; pragma: no cover
LOWwagtail/documents/models.py123 except Exception: # noqa: BLE001
AI Slop Vocabulary16 hits · 28 pts
SeverityFileLineSnippet
LOWwagtail/query.py524 # Assuming the situation is the latter, just return the root node.
LOWwagtail/blocks/base.py572 # In the base implementation, no substitutions happen, so we ignore the lookup and just call
MEDIUMwagtail/snippets/tests/test_locking.py492 """A user needs to unlock a snippet that's locked by another user in order to edit it."""
LOWwagtail/snippets/views/snippets.py254 # Hook response is not suitable for a JSON response, so ignore it and just use
LOWwagtail/snippets/views/snippets.py322 # Hook response is not suitable for a JSON response, so ignore it and just use
MEDIUMwagtail/images/models.py745 # utilize QuerySet.get_or_create(), which has better handling of
LOWwagtail/images/forms.py37 # For all other fields, just call its formfield() method.
MEDIUMwagtail/admin/userbar.py105 #: Should be used in conjunction with ``axe_custom_rules``.
LOWwagtail/admin/templatetags/wagtailadmin_tags.py230 # users having to log in again. So we just return the URL unchanged.
LOWwagtail/admin/tests/pages/test_edit_page.py1515 # Without TZ support, just use the submitted timestamp as-is
LOWwagtail/admin/views/pages/create.py286 # Hook response is not suitable for a JSON response, so ignore it and just use
LOWwagtail/admin/views/pages/edit.py662 # Hook response is not suitable for a JSON response, so ignore it and just use
LOWwagtail/management/commands/fixtree.py74 # Deleting only the *actual* orphans is a bit silly (since it'll just create
LOWwagtail/models/pages.py1461 # ``current_site`` is purposefully undocumented, as one can simply pass the request and get
MEDIUMwagtail/users/tests/test_admin_views.py2095 # Tests that use this method are testing the aforementioned
LOWwagtail/documents/forms.py35 # For all other fields, just call its formfield() method.
Decorative Section Separators6 hits · 18 pts
SeverityFileLineSnippet
MEDIUMwagtail/blocks/base.py33# =========================================
MEDIUMwagtail/blocks/base.py35# =========================================
MEDIUMwagtail/blocks/base.py699# ========================
MEDIUMwagtail/blocks/base.py701# ========================
MEDIUMwagtail/test/demosite/models.py19# =============================
MEDIUMwagtail/test/demosite/models.py146# =============================
Fake / Example Data18 hits · 16 pts
SeverityFileLineSnippet
LOWwagtail/test/utils/form_data.py140 'body': rich_text('<p>Lorem ipsum dolor sit amet</p>'),
LOWwagtail/test/utils/form_data.py140 'body': rich_text('<p>Lorem ipsum dolor sit amet</p>'),
LOWwagtail/tests/test_form_data_utils.py16 <input type="text" name="name" value="Jane Doe" placeholder="">
LOWwagtail/tests/test_form_data_utils.py134 ("name", ["Jane Doe"]),
LOWwagtail/tests/test_tests.py189 {"title": "Simple Lorem Page", "content": "Lorem ipsum dolor sit amet"},
LOWwagtail/tests/test_tests.py189 {"title": "Simple Lorem Page", "content": "Lorem ipsum dolor sit amet"},
LOWwagtail/admin/tests/tests.py468 username="superuser", email="admin@example.com", password="p"
LOWwagtail/admin/tests/tests.py474 username="superuser", email="admin@example.com", password="p"
LOWwagtail/contrib/frontend_cache/tests.py68 "EMAIL": "test@test.com",
LOWwagtail/contrib/frontend_cache/tests.py79 self.assertEqual(backends["cloudflare"].cloudflare_email, "test@test.com")
LOWwagtail/contrib/frontend_cache/tests.py423 "EMAIL": "test@test.com",
LOWwagtail/contrib/frontend_cache/tests.py441 "EMAIL": "test@test.com",
LOWwagtail/contrib/frontend_cache/tests.py828 "EMAIL": "test@test.com",
LOWwagtail/users/utils.py39 gravatar_url = get_gravatar_url('user@example.com')
LOWwagtail/users/utils.py43 'user@example.com',
LOWwagtail/api/v2/tests/test_pages.py1929 email="admin@example.com",
LOWdocs/advanced_topics/testing.md161 ('text', 'Lorem ipsum dolor sit amet'),
LOWdocs/advanced_topics/testing.md161 ('text', 'Lorem ipsum dolor sit amet'),
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippet
LOWwagtail/admin/views/generic/preview.py214 # make sure to update the docs for `Block.get_preview_context`.