AI Slop Code RIsk Monitor

wagtail/wagtail

A Django content management system focused on flexibility and user experience

14.9 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for wagtail/wagtail, a Python project with 20,549 GitHub stars. SynthScan examined 466,818 lines of code across 2437 source files, recording 6206 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 14.9 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

14.9
Adjusted Signal
14.9
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
20.5K
Stars
Python
Language
466.8K
Lines of Code
2.4K
Files
6.2K
Pattern Hits
2026-10-12
Scan Date
0.07
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 43.2/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 5467 finding(s).

Hallucinated Dependency & Supply Chain Risk 11.5/100 · LOW

Are imports declared and package/API names verified? 589 finding(s).

Agent Over-Engineering Ratio 41.5/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 5231 finding(s).

PR Review Velocity Impact 55.8/100 · HIGH

Which changes need focused human review? 6206 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 49HIGH 117MEDIUM 197LOW 5843

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 6206 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers5073 hits · 4491 pts
SeverityFileLineSnippetContext
LOWwagtail/tasks.py11def update_reference_index_task(app_label, model_name, pk):CODE
LOWwagtail/tasks.py37def delete_file_from_storage_task(deconstructed_storage, path):CODE
LOWwagtail/fields.py299 def get_block_by_content_path(self, value, path_elements):CODE
LOWwagtail/query.py613 def annotate_approved_schedule(self):CODE
LOWwagtail/query.py643 def annotate_has_untranslated_locale(self):CODE
LOWwagtail/coreutils.py286def get_supported_content_language_variant(lang_code, strict=False):CODE
LOWwagtail/coreutils.py293def _get_supported_content_language_variant(lang_code, strict=False):CODE
LOWwagtail/coreutils.py327def get_locales_display_names() -> dict:CODE
LOWwagtail/coreutils.py561def make_wagtail_template_fragment_key(fragment_name, page, site, vary_on=None):CODE
LOW⚡wagtail/wagtail_hooks.py103 def register_workflow_permissions():CODE
LOW⚡wagtail/wagtail_hooks.py110 def register_task_permissions():CODE
LOW⚡wagtail/wagtail_hooks.py118def describe_collection_children(collection):CODE
LOWwagtail/wagtail_hooks.py135def register_core_log_actions(actions):CODE
LOWwagtail/wagtail_hooks.py396 def _field_label_from_content_path(model, content_path):CODE
LOWwagtail/wagtail_hooks.py523def register_workflow_log_actions(actions):CODE
LOWwagtail/permissions.py79def register_permission_policy(CODE
LOWwagtail/log_actions.py148 def get_log_model_for_instance(self, instance):CODE
LOW⚡wagtail/signal_handlers.py25def post_save_site_signal_handler(instance, update_fields=None, **kwargs):CODE
LOW⚡wagtail/signal_handlers.py29def post_delete_site_signal_handler(instance, **kwargs):CODE
LOW⚡wagtail/signal_handlers.py33def pre_delete_page_unpublish(sender, instance, **kwargs):CODE
LOW⚡wagtail/signal_handlers.py40def post_delete_page_log_deletion(sender, instance, **kwargs):CODE
LOW⚡wagtail/signal_handlers.py44def reset_locales_display_names_cache(sender, instance, **kwargs):CODE
LOW⚡wagtail/signal_handlers.py52def disable_reference_index_auto_update():CODE
LOWwagtail/signal_handlers.py68def update_reference_index_on_save(instance, **kwargs):CODE
LOW⚡wagtail/signal_handlers.py81def remove_reference_index_on_delete(instance, **kwargs):CODE
LOW⚡wagtail/signal_handlers.py90def connect_reference_index_signal_handlers_for_model(model):CODE
LOW⚡wagtail/signal_handlers.py95def connect_reference_index_signal_handlers(**kwargs):CODE
LOW⚡wagtail/signal_handlers.py100def disconnect_reference_index_signal_handlers_for_model(model):CODE
LOW⚡wagtail/signal_handlers.py105def disconnect_reference_index_signal_handlers(**kwargs):CODE
LOWwagtail/views.py38def authenticate_with_password(request, page_view_restriction_id, page_id):CODE
LOWwagtail/blocks/list_block.py206 def defer_required_validation(self):CODE
LOWwagtail/blocks/list_block.py258 def restore_deferred_validation(self):CODE
LOWwagtail/blocks/list_block.py419 def get_block_by_content_path(self, value, path_elements):CODE
LOWwagtail/blocks/struct_block.py151 def unique_children_and_settings(self):CODE
LOWwagtail/blocks/struct_block.py305 def defer_required_validation(self):CODE
LOWwagtail/blocks/struct_block.py325 def restore_deferred_validation(self):CODE
LOWwagtail/blocks/struct_block.py443 def get_block_by_content_path(self, value, path_elements):CODE
LOWwagtail/blocks/stream_block.py164 def defer_required_validation(self):CODE
LOWwagtail/blocks/stream_block.py247 def restore_deferred_validation(self):CODE
LOWwagtail/blocks/stream_block.py434 def get_block_by_content_path(self, value, path_elements):CODE
LOWwagtail/blocks/stream_block.py831 def _deserialize_pickle_value(app_label, model_name, field_name, field_value):CODE
LOWwagtail/blocks/base.py175 def defer_required_validation(self):CODE
LOWwagtail/blocks/base.py199 def restore_deferred_validation(self):CODE
LOWwagtail/blocks/base.py435 def get_block_by_content_path(self, value, path_elements):CODE
LOWwagtail/blocks/field_block.py66 def defer_required_validation(self):CODE
LOWwagtail/blocks/field_block.py77 def restore_deferred_validation(self):CODE
LOW⚡wagtail/templatetags/wagtailcore_tags.py92def wagtail_documentation_path():CODE
LOW⚡wagtail/templatetags/wagtailcore_tags.py101def wagtail_release_notes_path():CODE
LOW⚡wagtail/templatetags/wagtailcore_tags.py106def wagtail_feature_release_whats_new_link():CODE
LOW⚡wagtail/templatetags/wagtailcore_tags.py114def wagtail_feature_release_editor_guide_link():CODE
LOWwagtail/snippets/models.py37def get_workflow_enabled_models():CODE
LOWwagtail/snippets/models.py66def _register_snippet_immediately(registerable, viewset=None):CODE
LOWwagtail/snippets/models.py95def register_deferred_snippets():CODE
LOWwagtail/snippets/wagtail_hooks.py36def register_snippets_menu_item():CODE
LOWwagtail/snippets/action_menu.py242def get_base_snippet_action_menu_items(model):CODE
LOWwagtail/snippets/permissions.py14def user_can_edit_snippet_type(user, model):CODE
LOWwagtail/snippets/tests/test_unpublish_view.py36 def test_unpublish_view_invalid_pk(self):CODE
LOWwagtail/snippets/tests/test_unpublish_view.py51 def test_unpublish_view_get_bad_permissions(self):CODE
LOWwagtail/snippets/tests/test_unpublish_view.py70 def test_unpublish_view_post_bad_permissions(self):CODE
LOWwagtail/snippets/tests/test_unpublish_view.py104 def test_unpublish_view_post_with_publish_permission(self):CODE
5013 more matches not shown…
Self-Referential Comments180 hits · 545 pts
SeverityFileLineSnippetContext
MEDIUMwagtail/fields.py275 # This method is used for serialization using django.core.serializers,COMMENT
MEDIUMwagtail/snippets/tests/test_history_view.py173 # Create a new revision with a new isolated contextCOMMENT
MEDIUMwagtail/snippets/tests/test_history_view.py179 # Create a new log context for each iteration to simulate multipleCOMMENT
MEDIUMwagtail/snippets/tests/test_usage.py108 # Create a user with basic admin backend accessCOMMENT
MEDIUMwagtail/snippets/tests/test_usage.py133 # Create a user with edit access to snippets but not pagesCOMMENT
MEDIUMwagtail/snippets/tests/test_permissions.py16 # Create a user with add_advert permission but not change_advertCOMMENT
MEDIUMwagtail/snippets/tests/test_permissions.py70 # Create a user with change_advert permission but not add_advertCOMMENT
MEDIUMwagtail/snippets/tests/test_permissions.py124 # Create a user with delete_advert permissionCOMMENT
MEDIUMwagtail/permission_policies/pages.py230 # This method is used all around the admin,COMMENT
MEDIUMwagtail/test/dummy_external_storage.py1# This file contains a file storage backend that imitates behaviours ofCOMMENT
MEDIUMwagtail/test/utils/wagtail_tests.py23 # Create a userCOMMENT
MEDIUMwagtail/test/utils/wagtail_factories/builder.py115 # Create a new StreamBlockFactory subclass, with a declaration for each block the userCOMMENT
MEDIUM⚡wagtail/images/models.py457 # Create a bounding box around all facesCOMMENT
MEDIUM⚡wagtail/images/models.py466 # Create a bounding box around all featuresCOMMENT
MEDIUM⚡wagtail/images/tests/test_jinja2_svg.py17 # Create a real test engineCOMMENT
MEDIUM⚡wagtail/images/tests/test_jinja2_svg.py22 # Create a raster imageCOMMENT
MEDIUM⚡wagtail/images/tests/test_jinja2_svg.py28 # Create an SVG imageCOMMENT
MEDIUMwagtail/images/tests/utils.py76 # Create an image with a missing file, by deserializing from a python objectSTRING
MEDIUMwagtail/images/tests/test_models.py73 # Create an image for running tests onCOMMENT
MEDIUMwagtail/images/tests/test_models.py212 # Create an image for running tests onCOMMENT
MEDIUMwagtail/images/tests/test_models.py319 # Create an image for running tests onCOMMENT
MEDIUMwagtail/images/tests/test_models.py390 # Create an image for running tests onCOMMENT
MEDIUMwagtail/images/tests/test_models.py476 # Create an image for running tests onSTRING
MEDIUMwagtail/images/tests/test_models.py573 # Create an image for running tests onSTRING
MEDIUMwagtail/images/tests/test_models.py1381 # Create an image with a big filename and focal pointSTRING
MEDIUMwagtail/images/tests/test_models.py1437 # Create an image to editSTRING
MEDIUMwagtail/images/tests/test_models.py1519 # Create an imageSTRING
MEDIUMwagtail/images/tests/test_models.py1549 # Create an image with a big filename and no extensionSTRING
MEDIUMwagtail/images/tests/test_models.py1566 # Create an image with a big filename and extensionsSTRING
MEDIUMwagtail/images/tests/test_admin_views.py1415 # Create an image to editCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py1776 # Create an image to editCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py1809 # Create an image to editCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py1838 # Create an image to editCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py1940 # Create an image to editCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py2001 # Create a user with change_image permission but not add_imageCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py2033 # Create a user with add_image permission but not change_imageCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py2162 # Create a new user in the Bakers group, and log in as them.COMMENT
MEDIUMwagtail/images/tests/test_admin_views.py2563 # Create an image to editCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py3093 # Create an image for running tests onCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py3628 # Create an image for running tests onCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py3909 # Create an UploadedFile for running tests onCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py4140 # Create an image for running tests onCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py4339 # Create an image for running tests onCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py4882 # Create an image to editCOMMENT
MEDIUMwagtail/images/tests/test_admin_views.py4888 # Create a user with change_image permission but not add_imageCOMMENT
MEDIUM⚡wagtail/images/tests/tests.py343 # Create an image for running tests onCOMMENT
MEDIUMwagtail/images/tests/tests.py54 # Create an image for running tests onCOMMENT
MEDIUMwagtail/images/tests/test_templatetags.py22 # Create an image for running tests onCOMMENT
MEDIUMwagtail/images/tests/test_templatetags.py138 # Create an image for running tests onCOMMENT
MEDIUM…tests/test_bulk_actions/test_bulk_add_to_collection.py110 # Create a group with image permissions on the source collection onlyCOMMENT
MEDIUM…management/commands/wagtail_update_image_renditions.py84 # Create a new oneCOMMENT
MEDIUMwagtail/tests/test_page_queryset.py542 # Create a translation of the homepageCOMMENT
MEDIUMwagtail/tests/test_page_queryset.py568 # Create a translation of the homepageCOMMENT
MEDIUMwagtail/tests/test_page_queryset.py1036 # Create a ContentType that doesn't correspond to a real modelCOMMENT
MEDIUMwagtail/tests/test_signals.py113 # Create a subpageCOMMENT
MEDIUMwagtail/tests/test_blocks.py2834 # Create a deep copy of the parent's form layout to include theCOMMENT
MEDIUM⚡wagtail/tests/test_page_model.py3799 # Create a page that does not have the default initCOMMENT
MEDIUM⚡wagtail/tests/test_page_model.py3806 # Create a page that does have the default initCOMMENT
MEDIUMwagtail/tests/test_page_model.py1693 # Create a child eventCOMMENT
MEDIUMwagtail/tests/test_page_model.py3419 # Create a singleton pageCOMMENT
120 more matches not shown…
Hallucination Indicators49 hits · 490 pts
SeverityFileLineSnippetContext
CRITICALwagtail/fields.py4from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/blocks/list_block.py5from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/blocks/struct_block.py6from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/blocks/stream_block.py8from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/locales/api/v3/router.py1from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/test/testapp/models.py13from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/test/demosite/models.py4from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/images/fields.py6from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/images/blocks.py2from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/tests/test_sites.py1from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/tests/test_blocks.py11from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/tests/test_audit_log.py7from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/tests/test_date_validators.py4from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/tests/test_workflow.py8from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/admin/forms/tags.py1from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/admin/forms/collections.py6from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/admin/panels/title_field_panel.py59 self.bound_field.field.widget.attrs.update(**self.get_attrs())CODE
CRITICALwagtail/admin/api/actions/delete.py1from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
CRITICALwagtail/admin/api/actions/create_alias.py2from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
CRITICALwagtail/admin/api/actions/convert_alias.py1from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
CRITICALwagtail/admin/api/actions/copy.py2from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
CRITICALwagtail/admin/api/actions/unpublish.py1from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
CRITICALwagtail/admin/api/actions/move.py2from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
CRITICALwagtail/admin/api/actions/revert_to_page_revision.py1from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
CRITICALwagtail/admin/api/actions/copy_for_translation.py1from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
CRITICALwagtail/admin/api/actions/publish.py1from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
CRITICALwagtail/admin/views/editing_sessions.py6from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/admin/views/reports/aging_pages.py4from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/admin/telepath/widgets.py8from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/utils/forms.py1from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/models/sites.py8from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/models/audit_log.py13from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/contrib/frontend_cache/backends/azure.py149 from azure.core.exceptions import HttpResponseError as HttpErrorCODE
CRITICALwagtail/contrib/forms/tests/test_models.py2from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/contrib/typed_table_block/tests.py1from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/contrib/typed_table_block/blocks.py2from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/contrib/table_block/blocks.py4from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/api/v2/filters.py3from django.core.exceptions import FieldErrorCODE
CRITICALwagtail/api/v3/errors.py5from django.core.exceptions import ValidationError as DjangoValidationErrorCODE
CRITICALwagtail/api/v3/form_data.py7from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/documents/models.py7from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/documents/fields.py2from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/documents/tests/test_document_field.py1from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/embeds/blocks.py1from django.core.exceptions import ValidationErrorCODE
CRITICALwagtail/embeds/tests/test_embeds.py10from django.core.exceptions import ValidationErrorCODE
CRITICALdocs/advanced_topics/streamfield_validation.md17from django.core.exceptions import ValidationErrorCODE
CRITICALdocs/advanced_topics/streamfield_validation.md51from django.core.exceptions import ValidationErrorCODE
CRITICALdocs/advanced_topics/streamfield_validation.md75from django.core.exceptions import ValidationErrorCODE
CRITICALdocs/reference/contrib/typed_table_block.md92from django.core.exceptions import ValidationErrorCODE
Empty Error Handlers51 hits · 255 pts
SeverityFileLineSnippetContext
HIGHwagtail/coreutils.py310except KeyError:CODE
HIGHwagtail/blocks/field_block.py374except KeyError:CODE
HIGHwagtail/templatetags/wagtailcore_tags.py70except KeyError:CODE
HIGHwagtail/test/testapp/models.py602except (TypeError, ValueError):CODE
HIGHwagtail/bin/wagtail.py88except ImportError:CODE
HIGHwagtail/images/models.py501except (AttributeError, KeyError):CODE
HIGHwagtail/images/models.py505except AttributeError:CODE
HIGHwagtail/images/formats.py69except AttributeError:CODE
HIGHwagtail/images/tests/test_models.py1357except ValueError:CODE
HIGHwagtail/tests/test_workflow_model.py25except KeyError:CODE
HIGHwagtail/tests/test_page_assertions.py119except self.failureException:CODE
HIGHwagtail/tests/test_page_assertions.py128except self.failureException:CODE
HIGHwagtail/tests/test_streamfield.py193except KeyError:CODE
HIGHwagtail/tests/test_draft_model.py22except KeyError:CODE
HIGHwagtail/tests/test_lockable_model.py22except KeyError:CODE
HIGHwagtail/admin/site_summary.py45except (Site.DoesNotExist, Site.MultipleObjectsReturned):CODE
HIGHwagtail/admin/utils.py60except AttributeError:CODE
HIGHwagtail/admin/userbar.py316except AttributeError:CODE
HIGHwagtail/admin/forms/auth.py76except KeyError:CODE
HIGHwagtail/admin/forms/models.py160except KeyError:CODE
HIGHwagtail/admin/forms/workflows.py115except AttributeError:CODE
HIGHwagtail/admin/viewsets/pages.py600except KeyError:CODE
HIGHwagtail/admin/panels/field_panel.py105except FieldDoesNotExist:CODE
HIGHwagtail/admin/tests/test_menu.py347except AttributeError:CODE
HIGHwagtail/admin/tests/test_menu.py385except AttributeError:CODE
HIGHwagtail/admin/views/editing_sessions.py154except KeyError:CODE
HIGHwagtail/admin/views/generic/chooser.py89except KeyError:CODE
HIGHwagtail/admin/views/generic/chooser.py192except KeyError:CODE
HIGHwagtail/admin/views/pages/listing.py188except ValueError:CODE
HIGHwagtail/admin/views/pages/ordering.py26except (IndexError, ValueError):CODE
HIGHwagtail/utils/registry.py34except KeyError:CODE
HIGHwagtail/utils/file.py18except (AttributeError, UnsupportedOperation):CODE
HIGHwagtail/models/copying.py84except AttributeError:CODE
HIGHwagtail/models/pages.py1462except LookupError:CODE
HIGHwagtail/models/pages.py2146except KeyError:CODE
HIGHwagtail/models/sites.py183except Site.DoesNotExist:CODE
HIGHwagtail/models/sites.py202except Site.DoesNotExist:CODE
HIGHwagtail/models/i18n.py88except KeyError:CODE
HIGHwagtail/models/i18n.py92except KeyError:CODE
HIGHwagtail/contrib/routable_page/models.py161except Http404:CODE
HIGHwagtail/project_template/project_name/settings/dev.py17except ImportError:CODE
HIGH…l/project_template/project_name/settings/production.py13except ImportError:CODE
HIGHwagtail/users/views/users.py83except FieldDoesNotExist:CODE
HIGHwagtail/api/v2/views.py496except FieldDoesNotExist:CODE
HIGHwagtail/api/v2/views.py269except ValueError:CODE
HIGHwagtail/api/v2/views.py296except KeyError:CODE
HIGHwagtail/api/v3/schemas/pages.py38except FieldDoesNotExist:CODE
HIGHwagtail/documents/models.py169except NotImplementedError:CODE
HIGHwagtail/embeds/embeds.py32except Embed.DoesNotExist:CODE
HIGHwagtail/embeds/finders/oembed.py96except (KeyError, TypeError, ValueError):CODE
HIGHwagtail/rich_text/rewriters.py164except KeyError:CODE
Unused Imports282 hits · 240 pts
SeverityFileLineSnippetContext
LOWwagtail/compat.py19CODE
LOWwagtail/coreutils.py29CODE
LOWwagtail/apps.py4CODE
LOWwagtail/wagtail_hooks.py23CODE
LOWwagtail/blocks/__init__.py2CODE
LOWwagtail/blocks/__init__.py3CODE
LOWwagtail/blocks/__init__.py4CODE
LOWwagtail/blocks/__init__.py5CODE
LOWwagtail/blocks/__init__.py6CODE
LOWwagtail/blocks/__init__.py7CODE
LOWwagtail/snippets/bulk_actions/__init__.py1CODE
LOWwagtail/snippets/api/v3/__init__.py1CODE
LOWwagtail/locales/views.py17CODE
LOWwagtail/locales/views.py17CODE
LOWwagtail/locales/api/v3/__init__.py1CODE
LOWwagtail/permission_policies/__init__.py1CODE
LOWwagtail/test/settings_ui.py1CODE
LOWwagtail/test/customuser/models.py13CODE
LOWwagtail/test/customuser/models.py15CODE
LOWwagtail/test/utils/__init__.py1CODE
LOWwagtail/test/utils/__init__.py2CODE
LOWwagtail/test/utils/__init__.py3CODE
LOWwagtail/test/utils/wagtail_factories/__init__.py1CODE
LOWwagtail/test/utils/wagtail_factories/__init__.py2CODE
LOWwagtail/images/models.py1CODE
LOWwagtail/images/apps.py5CODE
LOWwagtail/images/tests/tests.py45CODE
LOWwagtail/images/views/bulk_actions/__init__.py1CODE
LOWwagtail/images/views/bulk_actions/__init__.py2CODE
LOWwagtail/images/views/bulk_actions/__init__.py3CODE
LOWwagtail/admin/apps.py5CODE
LOWwagtail/admin/apps.py24CODE
LOWwagtail/admin/blocks.py3CODE
LOWwagtail/admin/ui/components.py2CODE
LOWwagtail/admin/ui/components.py2CODE
LOWwagtail/admin/forms/__init__.py2CODE
LOWwagtail/admin/forms/__init__.py2CODE
LOWwagtail/admin/forms/__init__.py2CODE
LOWwagtail/admin/forms/__init__.py2CODE
LOWwagtail/admin/forms/__init__.py2CODE
LOWwagtail/admin/forms/__init__.py9CODE
LOWwagtail/admin/panels/__init__.py4CODE
LOWwagtail/admin/panels/__init__.py4CODE
LOWwagtail/admin/panels/__init__.py9CODE
LOWwagtail/admin/panels/__init__.py10CODE
LOWwagtail/admin/panels/__init__.py11CODE
LOWwagtail/admin/panels/__init__.py12CODE
LOWwagtail/admin/panels/__init__.py13CODE
LOWwagtail/admin/panels/__init__.py14CODE
LOWwagtail/admin/panels/__init__.py15CODE
LOWwagtail/admin/panels/__init__.py16CODE
LOWwagtail/admin/panels/__init__.py17CODE
LOWwagtail/admin/panels/__init__.py18CODE
LOWwagtail/admin/panels/__init__.py19CODE
LOWwagtail/admin/panels/__init__.py20CODE
LOWwagtail/admin/panels/__init__.py21CODE
LOWwagtail/admin/rich_text/__init__.py4CODE
LOWwagtail/admin/views/bulk_action/__init__.py1CODE
LOWwagtail/admin/views/bulk_action/__init__.py2CODE
LOWwagtail/admin/views/generic/__init__.py1CODE
222 more matches not shown…
Cross-Language Confusion32 hits · 212 pts
SeverityFileLineSnippetContext
HIGHwagtail/tasks.py28 # parent is null, so there is no valid object to record references againstCOMMENT
HIGH…/tests/permission_policies/test_permission_policies.py577 # in order for user_has_any_permission to return trueCOMMENT
HIGH…/tests/permission_policies/test_permission_policies.py591 # should return falseCOMMENT
HIGH…/tests/permission_policies/test_permission_policies.py703 # in order for user_has_any_permission to return trueCOMMENT
HIGH…/tests/permission_policies/test_permission_policies.py716 # should return falseCOMMENT
HIGH…/tests/permission_policies/test_permission_policies.py967 # in order for user_has_any_permission to return trueCOMMENT
HIGH…/tests/permission_policies/test_permission_policies.py978 # should return falseCOMMENT
HIGH…/tests/permission_policies/test_permission_policies.py1176 # in order for user_has_any_permission to return trueCOMMENT
HIGH…/tests/permission_policies/test_permission_policies.py1189 # should return falseCOMMENT
HIGHwagtail/admin/wagtail_hooks.py730 # Keep pasted links with http/https protocol, and not-pasted links (href = undefined).COMMENT
HIGHwagtail/admin/userbar.py215 # The runOnly has to be omitted (instead of set to an empty list or null)COMMENT
HIGHwagtail/admin/panels/field_panel.py64 # - it corresponds to a non-null, non-text-typed model field (in which case a blank valueCOMMENT
HIGH⚡wagtail/admin/tests/test_edit_handlers.py1222 expected_js = 'new PageChooser("{id}", {{"modelNames": ["{model}"], "canChooseRoot": false, "userPerms": null, "CODE
HIGHwagtail/admin/tests/test_edit_handlers.py1246 expected_js = 'new PageChooser("{id}", {{"modelNames": ["{model}"], "canChooseRoot": true, "userPerms": null, "mCODE
HIGHwagtail/admin/tests/test_edit_handlers.py1304 expected_js = 'new PageChooser("{id}", {{"modelNames": ["{model}"], "canChooseRoot": false, "userPerms": null, "CODE
HIGHwagtail/admin/tests/test_edit_handlers.py1324 expected_js = 'new PageChooser("{id}", {{"modelNames": ["{model}"], "canChooseRoot": false, "userPerms": null, "CODE
HIGH⚡wagtail/admin/tests/test_widgets.py112 f'new PageChooser("test-id", {{"modelNames": ["{page_model_name}"], "canChooseRoot": false, "userPerms": nulCODE
HIGH⚡wagtail/admin/tests/test_widgets.py121 'new PageChooser("test-id", {"modelNames": ["tests.simplepage"], "canChooseRoot": false, "userPerms": null, CODE
HIGH⚡wagtail/admin/tests/test_widgets.py133 'new PageChooser("test-id", {"modelNames": ["tests.simplepage"], "canChooseRoot": false, "userPerms": null, CODE
HIGH⚡wagtail/admin/tests/test_widgets.py145 'new PageChooser("test-id", {"modelNames": ["tests.simplepage"], "canChooseRoot": false, "userPerms": null, CODE
HIGH⚡wagtail/admin/tests/test_widgets.py158 'new PageChooser("test-id", {"modelNames": ["tests.simplepage", "tests.eventpage"], "canChooseRoot": false, CODE
HIGH⚡wagtail/admin/tests/test_widgets.py170 f'new PageChooser("test-id", {{"modelNames": ["{page_model_name}"], "canChooseRoot": true, "userPerms": nullCODE
HIGHwagtail/admin/tests/test_widgets.py86 f'new PageChooser("test-id", {{"modelNames": ["{page_model_name}"], "canChooseRoot": false, "userPerms": nulCODE
HIGH…ail/admin/rich_text/converters/html_to_contentstate.py92 state.push()CODE
HIGHwagtail/admin/views/generic/models.py108 # is returned anyway (even if list_filter is undefined), so the localeCOMMENT
HIGHwagtail/management/commands/convert_mariadb_uuids.py25 old_field = models.CharField(null=null, max_length=36)CODE
HIGHwagtail/management/commands/convert_mariadb_uuids.py28 new_field = models.UUIDField(null=null)CODE
HIGHwagtail/models/pages.py440 # If non-null, this page is an alias of the linked pageCOMMENT
HIGHwagtail/models/pages.py1947 # fall back on latest_revision_created_at if last_published_at is nullCOMMENT
HIGHwagtail/contrib/settings/models.py77 If the field value is null, or links to something otherSTRING
HIGHwagtail/contrib/table_block/tests.py339 expected_json = '{"first_row_is_table_header": false, "first_col_is_header": false, "data": [["Foo", 1, null], [STRING
HIGHwagtail/contrib/sitemaps/sitemap_generator.py24 # fall back on latest_revision_created_at if last_published_at is nullCOMMENT
Fake / Example Data226 hits · 201 pts
SeverityFileLineSnippetContext
LOWwagtail/blocks/list_block.py459 icon = "placeholder"CODE
LOWwagtail/blocks/struct_block.py93 icon="placeholder",CODE
LOWwagtail/blocks/struct_block.py591 icon = "placeholder"CODE
LOWwagtail/blocks/stream_block.py491 icon = "placeholder"CODE
LOWwagtail/blocks/base.py64 icon = "placeholder"CODE
LOWwagtail/blocks/field_block.py98 icon = "placeholder"CODE
LOWwagtail/blocks/field_block.py497 icon = "placeholder"CODE
LOWwagtail/blocks/field_block.py612 icon = "placeholder"CODE
LOWwagtail/blocks/field_block.py984 icon = "placeholder"CODE
LOWwagtail/test/utils/form_data.py140 'body': rich_text('<p>Lorem ipsum dolor sit amet</p>'),STRING
LOWwagtail/test/utils/form_data.py140 'body': rich_text('<p>Lorem ipsum dolor sit amet</p>'),STRING
LOWwagtail/tests/test_form_data_utils.py16 <input type="text" name="name" value="Jane Doe" placeholder="">CODE
LOWwagtail/tests/test_form_data_utils.py134 ("name", ["Jane Doe"]),STRING
LOW⚡wagtail/tests/test_blocks.py988 "icon": "placeholder",CODE
LOW⚡wagtail/tests/test_blocks.py1484 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py194 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py346 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py2150 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py2438 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py2476 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py2555 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py2613 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py2644 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py3636 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py3663 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py3842 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py3872 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py4670 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py5607 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py5706 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py6270 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py6295 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py6319 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py6344 "icon": "placeholder",CODE
LOWwagtail/tests/test_blocks.py6369 "icon": "placeholder",CODE
LOW⚡wagtail/tests/test_tests.py189 {"title": "Simple Lorem Page", "content": "Lorem ipsum dolor sit amet"},CODE
LOW⚡wagtail/tests/test_tests.py189 {"title": "Simple Lorem Page", "content": "Lorem ipsum dolor sit amet"},CODE
LOWwagtail/admin/filters.py26 AdminDateInput(attrs={"placeholder": _("Date from")}),CODE
LOWwagtail/admin/filters.py27 AdminDateInput(attrs={"placeholder": _("Date to")}),CODE
LOWwagtail/admin/filters.py47 forms.NumberInput(attrs={"placeholder": _("Minimum"), "min": "0"}),CODE
LOWwagtail/admin/filters.py48 forms.NumberInput(attrs={"placeholder": _("Maximum"), "min": "0"}),CODE
LOWwagtail/admin/forms/auth.py14 "placeholder": gettext_lazy("Enter password"),CODE
LOWwagtail/admin/forms/auth.py31 self.fields["username"].widget.attrs["placeholder"] = gettext_lazy(CODE
LOWwagtail/admin/forms/choosers.py75 widget=forms.TextInput(attrs={"placeholder": _("Search")}),CODE
LOWwagtail/admin/forms/search.py8 placeholder = kwargs.pop("placeholder", _("Search…"))CODE
LOWwagtail/admin/forms/search.py11 "placeholder": placeholder,CODE
LOWwagtail/admin/forms/workflows.py30 placeholder = kwargs.pop("placeholder", _("Search…"))CODE
LOWwagtail/admin/forms/workflows.py32 self.fields["q"].widget.attrs = {"placeholder": placeholder}CODE
LOWwagtail/admin/panels/title_field_panel.py46 "placeholder": self.placeholder,CODE
LOWwagtail/admin/panels/title_field_panel.py88 if placeholder and "placeholder" not in widget.attrs:CODE
LOWwagtail/admin/panels/title_field_panel.py89 attrs["placeholder"] = placeholderCODE
LOW⚡wagtail/admin/tests/test_edit_handlers.py2388 self.assertEqual(attrs["placeholder"], "Page title*")CODE
LOW⚡wagtail/admin/tests/test_edit_handlers.py2604 self.assertNotIn("placeholder", attrs)CODE
LOW⚡wagtail/admin/tests/test_edit_handlers.py2615 self.assertNotIn("placeholder", attrs)CODE
LOW⚡wagtail/admin/tests/test_edit_handlers.py2626 self.assertNotIn("placeholder", attrs)CODE
LOW⚡wagtail/admin/tests/test_edit_handlers.py2635 attrs={"placeholder": "My custom placeholder"}CODE
LOW⚡wagtail/admin/tests/test_edit_handlers.py2647 self.assertEqual(attrs["placeholder"], "My custom placeholder")CODE
LOW⚡wagtail/admin/tests/test_edit_handlers.py2657 attrs={"placeholder": "WIDGET placeholder"}CODE
LOW⚡wagtail/admin/tests/test_edit_handlers.py2669 self.assertEqual(attrs["placeholder"], "WIDGET placeholder")CODE
LOW⚡wagtail/admin/tests/test_edit_handlers.py2679 attrs={"placeholder": "WIDGET placeholder"}CODE
166 more matches not shown…
Cross-File Repetition34 hits · 170 pts
SeverityFileLineSnippetContext
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 patSTRING
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 patSTRING
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 patSTRING
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 patSTRING
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 patSTRING
HIGHwagtail/blocks/struct_block.py0always deconstruct typedtableblock instances as if they were plain typedtableblock with all of the field definitions pasSTRING
HIGHwagtail/blocks/stream_block.py0always deconstruct typedtableblock instances as if they were plain typedtableblock with all of the field definitions pasSTRING
HIGHwagtail/contrib/typed_table_block/blocks.py0always deconstruct typedtableblock instances as if they were plain typedtableblock with all of the field definitions pasSTRING
HIGHwagtail/snippets/tests/test_unpublish_view.py0this tests that the unpublish view responds with an unpublish confirm pageSTRING
HIGHwagtail/admin/tests/pages/test_unpublish_page.py0this tests that the unpublish view responds with an unpublish confirm pageSTRING
HIGH…n/tests/pages/test_bulk_actions/test_bulk_unpublish.py0this tests that the unpublish view responds with an unpublish confirm pageSTRING
HIGHwagtail/snippets/tests/test_unpublish_view.py0this tests that the unpublish view doesn't allow users without unpublish permissionsSTRING
HIGHwagtail/admin/tests/pages/test_unpublish_page.py0this tests that the unpublish view doesn't allow users without unpublish permissionsSTRING
HIGH…n/tests/pages/test_bulk_actions/test_bulk_unpublish.py0this tests that the unpublish view doesn't allow users without unpublish permissionsSTRING
HIGHwagtail/snippets/tests/test_create_view.py0template[data-controller="w-teleport"][data-w-teleport-target-value="[data-edit-form]"] #schedule-publishing-dialogSTRING
HIGHwagtail/snippets/tests/test_edit_view.py0template[data-controller="w-teleport"][data-w-teleport-target-value="[data-edit-form]"] #schedule-publishing-dialogSTRING
HIGHwagtail/admin/tests/pages/test_edit_page.py0template[data-controller="w-teleport"][data-w-teleport-target-value="[data-edit-form]"] #schedule-publishing-dialogSTRING
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 reqSTRING
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 reqSTRING
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 reqSTRING
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 reqSTRING
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.STRING
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.STRING
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.STRING
HIGHwagtail/permission_policies/collections.py0return a queryset of users who have permission to perform the given action on some or all instances of this model.STRING
HIGHwagtail/permission_policies/sites.py0return a queryset of users who have permission to perform the given action on some or all instances of this model.STRING
HIGHwagtail/permission_policies/base.py0return a queryset of users who have permission to perform the given action on some or all instances of this model.STRING
HIGHwagtail/permission_policies/collections.py0return a queryset of all instances of this model for which the given user has permission to perform the given action.STRING
HIGHwagtail/permission_policies/sites.py0return a queryset of all instances of this model for which the given user has permission to perform the given action.STRING
HIGHwagtail/permission_policies/base.py0return a queryset of all instances of this model for which the given user has permission to perform the given action.STRING
HIGHwagtail/admin/tests/pages/test_revisions.py0this tests that the publish view returns an error if the page id is invalidSTRING
HIGHwagtail/admin/tests/pages/test_unpublish_page.py0this tests that the publish view returns an error if the page id is invalidSTRING
HIGH…n/tests/pages/test_bulk_actions/test_bulk_unpublish.py0this tests that the publish view returns an error if the page id is invalidSTRING
HIGH…min/tests/pages/test_bulk_actions/test_bulk_publish.py0this tests that the publish view returns an error if the page id is invalidSTRING
Deep Nesting115 hits · 110 pts
SeverityFileLineSnippetContext
LOWruntests.py38CODE
LOWwagtail/fields.py143CODE
LOWwagtail/query.py656CODE
LOWwagtail/whitelist.py34CODE
LOWwagtail/whitelist.py46CODE
LOWwagtail/coreutils.py354CODE
LOWwagtail/wagtail_hooks.py36CODE
LOWwagtail/wagtail_hooks.py37CODE
LOWwagtail/blocks/struct_block.py37CODE
LOWwagtail/blocks/stream_block.py36CODE
LOWwagtail/blocks/field_block.py614CODE
LOWwagtail/blocks/field_block.py668CODE
LOWwagtail/blocks/field_block.py727CODE
LOWwagtail/snippets/action_menu.py275CODE
LOWwagtail/snippets/views/snippets.py199CODE
LOWwagtail/permission_policies/collections.py292CODE
LOWwagtail/permission_policies/base.py404CODE
LOWwagtail/test/numberformat.py78CODE
LOWwagtail/test/utils/form_data.py147CODE
LOWwagtail/bin/wagtail.py203CODE
LOWwagtail/bin/wagtail.py331CODE
LOWwagtail/bin/wagtail.py354CODE
LOWwagtail/images/models.py654CODE
LOWwagtail/images/models.py1061CODE
LOWwagtail/images/templatetags/wagtailimages_tags.py13CODE
LOW…management/commands/wagtail_update_image_renditions.py40CODE
LOWwagtail/tests/test_utils.py364CODE
LOWwagtail/tests/test_page_queryset.py603CODE
LOWwagtail/tests/test_blocks.py69CODE
LOWwagtail/tests/test_hooks.py125CODE
LOWwagtail/tests/streamfield_migrations/test_migrations.py51CODE
LOWwagtail/admin/mail.py236CODE
LOWwagtail/admin/models.py24CODE
LOWwagtail/admin/checks.py106CODE
LOWwagtail/admin/localization.py121CODE
LOWwagtail/admin/wagtail_hooks.py310CODE
LOWwagtail/admin/action_menu.py274CODE
LOWwagtail/admin/messages.py38CODE
LOWwagtail/admin/userbar.py339CODE
LOWwagtail/admin/compare.py98CODE
LOWwagtail/admin/compare.py798CODE
LOWwagtail/admin/compare.py280CODE
LOWwagtail/admin/compare.py447CODE
LOWwagtail/admin/compare.py493CODE
LOWwagtail/admin/compare.py543CODE
LOWwagtail/admin/compare.py776CODE
LOWwagtail/admin/filters.py165CODE
LOWwagtail/admin/forms/models.py190CODE
LOWwagtail/admin/viewsets/model.py530CODE
LOWwagtail/admin/viewsets/pages.py631CODE
LOWwagtail/admin/panels/model_utils.py56CODE
LOWwagtail/admin/panels/group.py27CODE
LOWwagtail/admin/tests/pages/test_page_search.py344CODE
LOWwagtail/admin/views/editing_sessions.py21CODE
LOWwagtail/admin/views/collection_privacy.py11CODE
LOWwagtail/admin/views/chooser.py612CODE
LOWwagtail/admin/views/workflows.py865CODE
LOWwagtail/admin/views/account.py305CODE
LOWwagtail/admin/views/generic/mixins.py454CODE
LOWwagtail/admin/views/generic/models.py166CODE
55 more matches not shown…
Redundant / Tautological Comments32 hits · 51 pts
SeverityFileLineSnippetContext
LOWwagtail/blocks/definition_lookup.py72 # Check if we've already seen this block definitionCOMMENT
LOW⚡wagtail/snippets/tests/test_reordering.py243 # Check if obj3 is now the first item by taking obj1's sort_order andCOMMENT
LOW⚡wagtail/snippets/tests/test_reordering.py253 # Check if obj1 is now the second item by taking obj2's sort_orderCOMMENT
LOWwagtail/snippets/tests/test_reordering.py317 # Check if obj1 is now the second item by taking obj2's sort_orderCOMMENT
LOWwagtail/images/models.py184 # Open file if it is closedCOMMENT
LOWwagtail/images/models.py759 # Read file contents into memoryCOMMENT
LOWwagtail/images/models.py982 # Check if segment has braces to expandCOMMENT
LOWwagtail/images/forms.py29 # Check if this is the file fieldCOMMENT
LOWwagtail/images/tests/test_models.py890 # Check if get_rendition returns the rendition from cacheSTRING
LOWwagtail/tests/test_reference_index.py959 # Check if reference remains (pointing to dead target)COMMENT
LOWwagtail/tests/test_management_commands.py67 # Check if its fixedCOMMENT
LOWwagtail/tests/test_management_commands.py91 # Check if its fixedCOMMENT
LOW⚡wagtail/admin/tests/test_account_management.py378 # Check if the default title does not existCOMMENT
LOWwagtail/admin/tests/test_account_management.py308 # Check if the default title existsCOMMENT
LOW⚡wagtail/admin/tests/viewsets/test_model_viewset.py2113 # Check if obj3 is now the first item by taking obj1's sort_order andCOMMENT
LOW⚡wagtail/admin/tests/viewsets/test_model_viewset.py2122 # Check if obj1 is now the second item by taking obj2's sort_orderCOMMENT
LOWwagtail/admin/tests/viewsets/test_model_viewset.py2174 # Check if obj1 is now the second item by taking obj2's sort_orderCOMMENT
LOWwagtail/admin/tests/pages/test_copy_page.py1092 # Check if slug is hello-world-2COMMENT
LOWwagtail/admin/views/workflows.py491 # Set workflow to active if inactiveCOMMENT
LOWwagtail/admin/views/workflows.py820 # Set workflow to active if inactiveCOMMENT
LOWwagtail/models/pages.py844 # Check if this is a root page of any sites and clear the 'wagtail_site_root_paths' key if soCOMMENT
LOWwagtail/models/i18n.py345 # Check if the object has any parental keys to another translatable modelCOMMENT
LOWwagtail/contrib/settings/models.py207 # Check if we already have this in the cache and return it if so.COMMENT
LOW⚡wagtail/contrib/frontend_cache/signal_handlers.py35 # Loop through list and register signal handlers for each oneCOMMENT
LOWwagtail/contrib/simple_translation/models.py37 # Check if the source tree needs to be synchronised into any other treesCOMMENT
LOW…contrib/simple_translation/tests/test_wagtail_hooks.py239 # Check if fr and de blog post parent ids are in the translated listCOMMENT
LOW…contrib/simple_translation/tests/test_wagtail_hooks.py265 # Check if the new pages exist under their respective translated homepagesCOMMENT
LOW…contrib/simple_translation/tests/test_wagtail_hooks.py324 # Check if the fr and de pages exist under their original parent page (/blog/)COMMENT
LOWwagtail/api/querysets.py30 # Check if we have a specific site to look forCOMMENT
LOWwagtail/api/v3/schemas/generators/write.py226 # Check if existing meta type is optional, and if so, make the new metaCOMMENT
LOWwagtail/documents/models.py95 # Open file if it is closedCOMMENT
LOWwagtail/embeds/finders/oembed.py72 # Check if 'type' is missingCOMMENT
Over-Commented Block36 hits · 34 pts
SeverityFileLineSnippetContext
LOWwagtail/signals.py61COMMENT
LOWwagtail/fields.py221 ):COMMENT
LOWwagtail/blocks/list_block.py21COMMENT
LOWwagtail/blocks/base.py601 # surname = CharBlock()COMMENT
LOWwagtail/snippets/bulk_actions/delete.py21 @cached_propertyCOMMENT
LOWwagtail/snippets/views/snippets.py521COMMENT
LOWwagtail/permission_policies/collections.py301 # on any instanceCOMMENT
LOWwagtail/tests/test_blocks.py5901 [COMMENT
LOWwagtail/admin/menu.py161 #: The icon used for the menu item that appears in Wagtail's sidebar.COMMENT
LOWwagtail/admin/templatetags/wagtailadmin_tags.py221 request = context.get("request")COMMENT
LOWwagtail/admin/viewsets/model.py81 #:COMMENT
LOWwagtail/admin/tests/test_audit_log.py221 # 3 edits without UUIDCOMMENT
LOWwagtail/admin/tests/test_menu.py421 # automatically generated from the label, which is translatable.COMMENT
LOWwagtail/admin/tests/test_editing_sessions.py1781 self.assertLessEqual(COMMENT
LOWwagtail/admin/views/editing_sessions.py161 and not users_other_session["revision_id"]COMMENT
LOWwagtail/admin/views/generic/multiple_upload.py21COMMENT
LOWwagtail/models/pages.py1201 )COMMENT
LOWwagtail/models/reference_index.py161 # For example, say we have a StreamField called 'body' which has a struct block typeCOMMENT
LOWwagtail/models/reference_index.py901COMMENT
LOWwagtail/api/v3/registry.py141COMMENT
LOWwagtail/api/v3/form_data.py341 elif hasattr(field.widget, "converter"):COMMENT
LOWwagtail/rich_text/feature_registry.py21 # of feature names to 'plugin' objects that define how to implement that featureCOMMENT
LOWdocs/conf.py1#COMMENT
LOWdocs/conf.py141project = "Wagtail Documentation"COMMENT
LOWdocs/conf.py161# today_fmt = '%B %d, %Y'COMMENT
LOWdocs/conf.py241 # https://myst-parser.readthedocs.io/en/latest/syntax/cross-referencing.html#customising-external-url-resolutionCOMMENT
LOWdocs/conf.py261# of the sidebar.COMMENT
LOWdocs/conf.py281# html_last_updated_fmt = '%b %d, %Y'COMMENT
LOWdocs/conf.py301html_use_index = FalseCOMMENT
LOWdocs/conf.py321# html_file_suffix = NoneCOMMENT
LOWdocs/conf.py361# If true, show page references after internal links.COMMENT
LOW.github/workflows/test.yml21# DISABLE_TIMEZONE=yes and WAGTAIL_CHECK_TEMPLATE_NUMBER_FORMAT=1COMMENT
LOWclient/scss/components/_preview-panel.scss41 // Ensure that sites without a background show with a fallback, only when iframe has loadedCOMMENT
LOWclient/src/components/Sidebar/menu/SubMenuItem.tsx41 // to finish before making it invisibleCOMMENT
LOW…/src/components/StreamField/blocks/StructBlock.test.js921 // group(root):COMMENT
LOW…ypoints/contrib/typed_table_block/typed_table_block.js21 // * id: the unique ID number assigned to this column, used in field name prefixesCOMMENT
Modern Structural Boilerplate33 hits · 34 pts
SeverityFileLineSnippetContext
LOWwagtail/coreutils.py31logger = logging.getLogger(__name__)CODE
LOWwagtail/blocks/list_block.py22__all__ = ["ListBlock", "ListBlockValidationError"]CODE
LOWwagtail/blocks/static_block.py11__all__ = ["StaticBlock"]CODE
LOWwagtail/blocks/struct_block.py27__all__ = [CODE
LOWwagtail/blocks/stream_block.py27__all__ = [CODE
LOW⚡wagtail/blocks/base.py23__all__ = [CODE
LOWwagtail/blocks/field_block.py1100__all__ = [cls.__name__ for cls in block_classes]CODE
LOWwagtail/snippets/bulk_actions/__init__.py3__all__ = ["DeleteBulkAction"]CODE
LOWwagtail/snippets/api/v3/__init__.py3__all__ = [CODE
LOWwagtail/locales/api/v3/__init__.py3__all__ = [CODE
LOWwagtail/test/utils/wagtail_factories/factories.py16__all__ = [CODE
LOWwagtail/test/utils/wagtail_factories/blocks.py18__all__ = [CODE
LOW…management/commands/wagtail_update_image_renditions.py8logger = logging.getLogger(__name__)CODE
LOWwagtail/images/views/bulk_actions/__init__.py5__all__ = ["AddToCollectionBulkAction", "AddTagsBulkAction", "DeleteBulkAction"]CODE
LOWwagtail/admin/views/bulk_action/__init__.py4__all__ = ["BulkAction", "index"]CODE
LOWwagtail/admin/views/pages/bulk_actions/__init__.py6__all__ = [CODE
LOWwagtail/contrib/settings/models.py12__all__ = [CODE
LOWwagtail/contrib/frontend_cache/backends/azure.py14__all__ = ["AzureBaseBackend", "AzureFrontDoorBackend", "AzureCdnBackend"]CODE
LOWwagtail/contrib/frontend_cache/backends/cloudflare.py11__all__ = ["CloudflareBackend"]CODE
LOWwagtail/contrib/frontend_cache/backends/http.py13__all__ = ["PurgeRequest", "HTTPBackend"]CODE
LOWwagtail/contrib/frontend_cache/backends/cloudfront.py13__all__ = ["CloudfrontBackend"]CODE
LOWwagtail/contrib/frontend_cache/backends/base.py8__all__ = ["BaseBackend"]CODE
LOWwagtail/contrib/redirects/signal_handlers.py16logger = logging.getLogger(__name__)CODE
LOWwagtail/contrib/redirects/api/__init__.py4__all__ = [CODE
LOWwagtail/contrib/redirects/api/v3/__init__.py3__all__ = [CODE
LOWwagtail/users/tests/__init__.py5__all__ = [CODE
LOWwagtail/users/views/bulk_actions/__init__.py5__all__ = ["AssignRoleBulkAction", "DeleteBulkAction", "SetActiveStateBulkAction"]CODE
LOWwagtail/actions/__init__.py27__all__ = [CODE
LOWwagtail/api/v3/urls.py18__all__ = ["api"]CODE
LOWwagtail/api/v3/form_data.py317def _set_field_value(field: Field, name: str, value: Any, data: MultiValueDict) -> None:CODE
LOWwagtail/api/v3/schemas/__init__.py21__all__ = [CODE
LOWwagtail/api/v3/schemas/generators/__init__.py4__all__ = [CODE
LOWwagtail/documents/views/bulk_actions/__init__.py5__all__ = ["AddToCollectionBulkAction", "AddTagsBulkAction", "DeleteBulkAction"]CODE
Excessive Try-Catch Wrapping26 hits · 32 pts
SeverityFileLineSnippetContext
MEDIUMsetup.py12 print("Error compiling assets: " + str(e)) # noqa: T201CODE
LOWwagtail/blocks/base.py718 except Exception as e: # noqa: BLE001CODE
MEDIUMwagtail/blocks/base.py710defCODE
LOWwagtail/test/dummy_external_storage.py88 except Exception as e: # noqa: BLE001CODE
MEDIUMwagtail/test/dummy_external_storage.py85def size(self):CODE
LOWwagtail/test/utils/page_tests.py262 except Exception as e: # noqa: BLE001CODE
LOWwagtail/test/utils/page_tests.py338 except Exception as e: # noqa: BLE001CODE
LOWwagtail/test/utils/page_tests.py369 except Exception as e: # noqa: BLE001CODE
LOWwagtail/test/utils/page_tests.py424 except Exception as e: # noqa: BLE001CODE
LOWwagtail/test/utils/page_tests.py440 except Exception as e: # noqa: BLE001CODE
LOWwagtail/test/utils/decorators.py22 except Exception as e: # noqa: BLE001CODE
LOWwagtail/images/models.py170 except Exception as e: # noqa: BLE001CODE
LOWwagtail/images/fields.py186 except Exception as exc: # noqa: BLE001CODE
MEDIUMwagtail/images/fields.py120def check_image_pixel_size(self, f):CODE
LOWwagtail/images/tests/test_management_commands.py41 except Exception: # noqa: BLE001CODE
MEDIUMwagtail/tests/test_utils.py183def test_pickleability(self):CODE
LOWwagtail/tests/test_utils.py186 except Exception as e: # noqa: BLE001CODE
LOWwagtail/tests/test_utils.py193 except Exception as e: # noqa: BLE001CODE
LOWwagtail/admin/mail.py131 except Exception:CODE
LOWwagtail/admin/mail.py274 except Exception:CODE
LOW…nagement/commands/create_log_entries_from_revisions.py48 except Exception: # noqa: BLE001CODE
LOW…nagement/commands/create_log_entries_from_revisions.py60 except Exception: # noqa: BLE001CODE
LOW⚡…ail/contrib/settings/tests/site_specific/test_model.py85 except Exception as e: # noqa: BLE001CODE
LOW⚡…ail/contrib/settings/tests/site_specific/test_model.py93 except Exception as e: # noqa: BLE001CODE
LOWwagtail/contrib/redirects/views.py278 except Exception as e: # noqa: BLE001 ; pragma: no coverCODE
LOWwagtail/documents/models.py124 except Exception: # noqa: BLE001CODE
AI Slop Vocabulary17 hits · 31 pts
SeverityFileLineSnippetContext
LOWwagtail/query.py524 # Assuming the situation is the latter, just return the root node.COMMENT
LOWwagtail/blocks/base.py572 # In the base implementation, no substitutions happen, so we ignore the lookup and just callCOMMENT
MEDIUMwagtail/snippets/tests/test_locking.py492 """A user needs to unlock a snippet that's locked by another user in order to edit it."""STRING
LOWwagtail/snippets/views/snippets.py262 # Hook response is not suitable for a JSON response, so ignore it and just useCOMMENT
LOWwagtail/snippets/views/snippets.py330 # Hook response is not suitable for a JSON response, so ignore it and just useCOMMENT
MEDIUMwagtail/images/models.py751 # utilize QuerySet.get_or_create(), which has better handling ofCOMMENT
LOWwagtail/images/forms.py40 # For all other fields, just call its formfield() method.COMMENT
MEDIUMwagtail/admin/userbar.py105 #: Should be used in conjunction with ``axe_custom_rules``.COMMENT
LOWwagtail/admin/templatetags/wagtailadmin_tags.py230 # users having to log in again. So we just return the URL unchanged.COMMENT
LOWwagtail/admin/tests/pages/test_edit_page.py1514 # Without TZ support, just use the submitted timestamp as-isCOMMENT
LOWwagtail/admin/views/pages/create.py295 # Hook response is not suitable for a JSON response, so ignore it and just useCOMMENT
LOWwagtail/admin/views/pages/edit.py664 # Hook response is not suitable for a JSON response, so ignore it and just useCOMMENT
LOWwagtail/management/commands/fixtree.py77 # Deleting only the *actual* orphans is a bit silly (since it'll just createCOMMENT
LOWwagtail/models/pages.py1520 # ``current_site`` is purposefully undocumented, as one can simply pass the request and getCOMMENT
MEDIUMwagtail/users/tests/test_admin_views.py2102 # Tests that use this method are testing the aforementionedCOMMENT
MEDIUMwagtail/api/v3/tests/test_auth.py125 # schema is the comprehensive source of truth for what is served.COMMENT
LOWwagtail/documents/forms.py35 # For all other fields, just call its formfield() method.COMMENT
Decorative Section Separators6 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUM⚡wagtail/blocks/base.py33# =========================================COMMENT
MEDIUM⚡wagtail/blocks/base.py35# =========================================COMMENT
MEDIUMwagtail/blocks/base.py699# ========================COMMENT
MEDIUMwagtail/blocks/base.py701# ========================COMMENT
MEDIUMwagtail/test/demosite/models.py26# =============================COMMENT
MEDIUMwagtail/test/demosite/models.py158# =============================COMMENT
AI Structural Patterns8 hits · 7 pts
SeverityFileLineSnippetContext
LOWwagtail/blocks/field_block.py747CODE
LOWwagtail/admin/templatetags/wagtailadmin_tags.py1186CODE
LOWwagtail/admin/ui/side_panels.py68CODE
LOWwagtail/admin/ui/tables/__init__.py271CODE
LOWwagtail/models/pages.py1785CODE
LOWwagtail/models/pages.py1819CODE
LOWwagtail/actions/create_alias.py58CODE
LOWwagtail/actions/copy_page.py40CODE
Structural Annotation Overuse4 hits · 6 pts
SeverityFileLineSnippetContext
LOWdocs/advanced_topics/i18n.md546###### Step 1: Add `BootstrapTranslatableMixin` to the modelCOMMENT
LOWdocs/advanced_topics/i18n.md571###### Step 2: Create a data migrationCOMMENT
LOWdocs/advanced_topics/i18n.md602###### Step 3: Change `BootstrapTranslatableMixin` to `TranslatableMixin`COMMENT
LOWdocs/advanced_topics/i18n.md622###### Step 4: Run `makemigrations` to generate schema migrations, then migrate!COMMENT
Modern AI Meta-Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMdocs/packages/index.md17We recommend the [cookiecutter-wagtail-package](https://github.com/wagtail/cookiecutter-wagtail-package) template to scaCODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWwagtail/admin/views/generic/preview.py214 # make sure to update the docs for `Block.get_preview_context`.COMMENT