Repository Analysis

django/django

The Web framework for perfectionists with deadlines.

21.1 Moderate AI signal View on GitHub
21.1
Adjusted Score
21.1
Raw Score
100%
Time Factor
2026-05-29
Last Push
87,583
Stars
Python
Language
675,703
Lines of Code
3814
Files
11221
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 196HIGH 255MEDIUM 414LOW 10356

Pattern Findings

11221 matches across 17 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers8827 hits · 8050 pts
SeverityFileLineSnippet
LOWtests/runtests.py156def get_filtered_test_modules(start_at, start_after, gis_enabled, test_labels=None):
LOWtests/generic_views/test_list.py66 def test_paginated_queryset_shortdata(self):
LOWtests/generic_views/test_list.py77 def test_paginated_get_page_by_query_string(self):
LOWtests/generic_views/test_list.py87 def test_paginated_get_last_page_by_query_string(self):
LOWtests/generic_views/test_list.py96 def test_paginated_get_page_by_urlvar(self):
LOWtests/generic_views/test_list.py106 def test_paginated_page_out_of_range(self):
LOWtests/generic_views/test_list.py111 def test_paginated_invalid_page(self):
LOWtests/generic_views/test_list.py116 def test_paginated_custom_paginator_class(self):
LOWtests/generic_views/test_list.py124 def test_paginated_custom_page_kwarg(self):
LOWtests/generic_views/test_list.py136 def test_paginated_custom_paginator_constructor(self):
LOWtests/generic_views/test_list.py143 def test_paginated_orphaned_queryset(self):
LOWtests/generic_views/test_list.py157 def test_paginated_non_queryset(self):
LOWtests/generic_views/test_list.py187 def test_template_name_suffix(self):
LOWtests/generic_views/test_list.py202 def test_duplicate_context_object_name(self):
LOWtests/generic_views/test_list.py218 def test_invalid_get_queryset(self):
LOWtests/generic_views/test_list.py226 def test_paginated_list_view_does_not_load_entire_table(self):
LOWtests/generic_views/test_list.py237 def test_explicitly_ordered_list_view(self):
LOWtests/generic_views/test_list.py254 def test_paginated_list_view_returns_useful_message_on_invalid_page(self):
LOWtests/generic_views/test_detail.py53 def test_detail_missing_object(self):
LOWtests/generic_views/test_detail.py57 def test_detail_object_does_not_exist(self):
LOWtests/generic_views/test_detail.py79 def test_detail_by_custom_slug(self):
LOWtests/generic_views/test_detail.py90 def test_detail_by_pk_ignore_slug(self):
LOWtests/generic_views/test_detail.py99 def test_detail_by_pk_ignore_slug_mismatch(self):
LOWtests/generic_views/test_detail.py108 def test_detail_by_pk_and_slug(self):
LOWtests/generic_views/test_detail.py137 def test_template_name_suffix(self):
LOWtests/generic_views/test_detail.py163 def test_duplicated_context_object_name(self):
LOWtests/generic_views/test_detail.py185 def test_deferred_queryset_template_name(self):
LOWtests/generic_views/test_detail.py195 def test_deferred_queryset_context_object_name(self):
LOWtests/generic_views/test_detail.py218 def test_non_model_object_with_meta(self):
LOWtests/generic_views/test_dates.py75 def test_allow_empty_archive_view(self):
LOWtests/generic_views/test_dates.py82 def test_archive_view_template(self):
LOWtests/generic_views/test_dates.py92 def test_archive_view_template_suffix(self):
LOWtests/generic_views/test_dates.py102 def test_archive_view_invalid(self):
LOWtests/generic_views/test_dates.py110 def test_archive_view_by_month(self):
LOWtests/generic_views/test_dates.py118 def test_paginated_archive_view(self):
LOWtests/generic_views/test_dates.py892 def test_get_object_custom_queryset_numqueries(self):
LOWtests/generic_views/test_dates.py896 def test_datetime_date_detail(self):
LOWtests/generic_views/test_dates.py903 def test_aware_datetime_date_detail(self):
LOWtests/generic_views/test_dates.py59 def test_archive_view_context_object_name(self):
LOWtests/generic_views/test_dates.py134 def test_paginated_archive_view_does_not_load_entire_table(self):
LOWtests/generic_views/test_dates.py150 def test_datetime_archive_view(self):
LOWtests/generic_views/test_dates.py158 def test_aware_datetime_archive_view(self):
LOWtests/generic_views/test_dates.py175 def test_archive_view_custom_sorting(self):
LOWtests/generic_views/test_dates.py190 def test_archive_view_custom_sorting_dec(self):
LOWtests/generic_views/test_dates.py205 def test_archive_view_without_date_field(self):
LOWtests/generic_views/test_dates.py224 def test_year_view_make_object_list(self):
LOWtests/generic_views/test_dates.py251 def test_year_view_allow_future(self):
LOWtests/generic_views/test_dates.py281 def test_year_view_custom_sort_order(self):
LOWtests/generic_views/test_dates.py303 def test_year_view_two_custom_sort_orders(self):
LOWtests/generic_views/test_dates.py330 def test_year_view_invalid_pattern(self):
LOWtests/generic_views/test_dates.py346 def test_aware_datetime_year_view(self):
LOWtests/generic_views/test_dates.py362 def test_get_context_data_receives_extra_context(self, mock):
LOWtests/generic_views/test_dates.py379 def test_get_dated_items_not_implemented(self):
LOWtests/generic_views/test_dates.py402 def test_month_view_allow_empty(self):
LOWtests/generic_views/test_dates.py425 def test_month_view_allow_future(self):
LOWtests/generic_views/test_dates.py453 def test_month_view_paginated(self):
LOWtests/generic_views/test_dates.py470 def test_month_view_invalid_pattern(self):
LOWtests/generic_views/test_dates.py474 def test_previous_month_without_content(self):
LOWtests/generic_views/test_dates.py503 def test_month_view_get_month_from_request(self):
LOWtests/generic_views/test_dates.py514 def test_month_view_without_month_in_url(self):
8767 more matches not shown…
Hallucination Indicators196 hits · 2270 pts
SeverityFileLineSnippet
CRITICALtests/expressions_case/tests.py7from django.core.exceptions import FieldError
CRITICALtests/model_forms/test_modelchoicefield.py4from django.core.exceptions import ValidationError
CRITICALtests/model_forms/models.py7from django.core.exceptions import ValidationError
CRITICALtests/model_forms/test_uuid.py2from django.core.exceptions import ValidationError
CRITICALtests/aggregation/tests.py8from django.core.exceptions import FieldError
CRITICALtests/composite_pk/test_update.py1from django.core.exceptions import FieldError
CRITICALtests/composite_pk/test_models.py2from django.core.exceptions import ValidationError
CRITICALtests/auth_tests/test_forms.py30from django.core.exceptions import ValidationError
CRITICALtests/select_related/tests.py3from django.core.exceptions import FieldError
CRITICALtests/dates/tests.py4from django.core.exceptions import FieldError
CRITICALtests/foreign_object/tests.py6from django.core.exceptions import FieldError, ValidationError
CRITICALtests/model_regress/tests.py5from django.core.exceptions import ValidationError
CRITICALtests/cache/tests.py2095 django.core.cache.backends.base.BaseCache.__init__().
CRITICALtests/custom_lookups/tests.py5from django.core.exceptions import FieldError
CRITICALtests/update/tests.py3from django.core.exceptions import FieldError
CRITICALtests/constraints/tests.py4from django.core.exceptions import ValidationError
CRITICALtests/model_inheritance/tests.py3from django.core.exceptions import FieldError, ValidationError
CRITICALtests/generic_relations/tests.py3from django.core.exceptions import FieldError, FieldFetchBlocked
CRITICALtests/forms_tests/field_tests/test_urlfield.py1from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_charfield.py1from django.core.exceptions import ValidationError
CRITICAL…sts/forms_tests/field_tests/test_splitdatetimefield.py3from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_typedchoicefield.py3from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_emailfield.py1from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_uuidfield.py3from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_combofield.py1from django.core.exceptions import ValidationError
CRITICAL…ts/forms_tests/field_tests/test_multiplechoicefield.py1from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_filepathfield.py4from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_floatfield.py1from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_multivaluefield.py3from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_integerfield.py1from django.core.exceptions import ValidationError
CRITICAL…rms_tests/field_tests/test_typedmultiplechoicefield.py3from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_filefield.py4from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_datetimefield.py3from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_choicefield.py1from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_datefield.py4from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_booleanfield.py3from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_decimalfield.py3from django.core.exceptions import ValidationError
CRITICAL…/forms_tests/field_tests/test_genericipaddressfield.py1from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_regexfield.py3from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_timefield.py3from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_imagefield.py4from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/field_tests/test_durationfield.py3from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/tests/test_utils.py4from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/tests/test_input_formats.py4from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/tests/test_validators.py7from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/tests/test_error_messages.py1from django.core.exceptions import ValidationError
CRITICALtests/forms_tests/tests/test_formsets.py5from django.core.exceptions import ValidationError
CRITICALtests/test_exceptions/test_validation_error.py4from django.core.exceptions import ValidationError
CRITICALtests/select_for_update/tests.py7from django.core.exceptions import FieldError
CRITICALtests/queries/test_q.py3from django.core.exceptions import FieldError
CRITICALtests/queries/test_query.py3from django.core.exceptions import FieldError
CRITICALtests/model_options/test_default_related_name.py1from django.core.exceptions import FieldError
CRITICALtests/lookup/tests.py7from django.core.exceptions import FieldError
CRITICALtests/reverse_lookup/tests.py1from django.core.exceptions import FieldError
CRITICALtests/admin_views/models.py9from django.core.exceptions import ValidationError
CRITICALtests/admin_views/custom_has_permission_admin.py8from django.core.exceptions import ValidationError
CRITICALtests/admin_views/forms.py4from django.core.exceptions import ValidationError
CRITICALtests/admin_views/admin.py13from django.core.exceptions import ValidationError
CRITICALtests/schema/tests.py8from django.core.exceptions import FieldError
CRITICALtests/custom_managers/tests.py497 self.b1.fun_authors.through._default_manager.all(),
136 more matches not shown…
Self-Referential Comments355 hits · 966 pts
SeverityFileLineSnippet
MEDIUMtests/runtests.py523 # Create a specific subdirectory for the duration of the test suite.
MEDIUMtests/generic_views/test_dates.py252 # Create a new book in the future
MEDIUMtests/mutually_referential/tests.py8 # Create a Parent
MEDIUMtests/model_forms/tests.py1640 # Create a ModelForm, instantiate it, and check that the output is as
MEDIUMtests/model_forms/tests.py1878 # Create a new article, with categories, via the form.
MEDIUMtests/model_forms/tests.py1896 # Create a new article, with no categories, via the form.
MEDIUMtests/model_forms/tests.py1904 # Create a new article, with categories, via the form, but use
MEDIUMtests/fixtures_regress/tests.py88 # Create a new animal. Without a sequence reset, this new object
MEDIUMtests/fixtures_regress/tests.py474 # Create an instance of the concrete class
MEDIUMtests/auth_tests/urls_admin.py11# Create a silo'd admin site for just the user/group admins.
MEDIUMtests/auth_tests/test_management.py524 # Creating a second user with the same email won't be caught by
MEDIUMtests/sessions_tests/tests.py697 # Create a session
MEDIUMtests/foreign_object/tests.py77 # Creating a valid membership because it has the same country has the
MEDIUMtests/foreign_object/tests.py85 # Creating an invalid membership because it has a different country has
MEDIUMtests/foreign_object/tests.py99 # Creating a to valid memberships
MEDIUMtests/foreign_object/tests.py111 # Creating an invalid membership
MEDIUMtests/foreign_object/tests.py128 # Creating a to valid memberships
MEDIUMtests/foreign_object/tests.py142 # Creating an invalid membership
MEDIUMtests/foreign_object/tests.py168 # Creating an invalid membership
MEDIUMtests/generic_inline_admin/tests.py425 # Create a formset with default arguments
MEDIUMtests/generic_inline_admin/tests.py430 # Create a formset with custom keyword arguments
MEDIUMtests/template_tests/test_response.py173 # Create a template response. The context is
MEDIUMtests/template_tests/test_response.py310 # Create a template response. The context is
MEDIUMtests/template_tests/test_context.py277 # Create an engine without any context processors.
MEDIUMtests/generic_relations_regress/tests.py186 # Create a couple of extra HasLinkThing so that the autopk value
MEDIUMtests/generic_relations/tests.py642 # Create a Vegetable and Mineral with the same id.
MEDIUMtests/file_uploads/tests.py191 # This file contains Chinese symbols and an accented char in the
MEDIUMtests/file_uploads/tests.py892 # Create a file with the upload directory name
MEDIUMtests/mail/test_backends.py77 # Create an instance of the backend_class for use in this test context
MEDIUMtests/backends/tests.py242 # Create an object with a manually specified PK
MEDIUMtests/backends/tests.py631 # Create a Reporter.
MEDIUMtests/backends/tests.py666 # Create an Article.
MEDIUMtests/backends/tests.py703 # Create an Article.
MEDIUMtests/backends/tests.py726 # Create an Article.
MEDIUMtests/backends/tests.py748 # Create an Article.
MEDIUMtests/backends/base/test_base.py80 # Create a new connection that will be closed during the test, and also
MEDIUMtests/file_storage/tests.py421 # Create a storage backend associated with the mixed case name
MEDIUMtests/select_for_update/tests.py562 # This method is run in a separate thread. It uses its own
MEDIUMtests/select_for_update/tests.py634 # This method is run in a separate thread. It uses its own
MEDIUMtests/queries/tests.py3411 # Create a few Orders.
MEDIUMtests/basic/tests.py602 # Create an Article.
MEDIUMtests/basic/tests.py699 # Create a very similar object
MEDIUMtests/lookup/test_timefield.py9 # Create a few Alarms
MEDIUMtests/lookup/tests.py53 # Create a few Authors.
MEDIUMtests/lookup/tests.py56 # Create a few Articles.
MEDIUMtests/lookup/tests.py99 # Create a few Tags.
MEDIUMtests/many_to_one_null/tests.py9 # Create a Reporter.
MEDIUMtests/many_to_one_null/tests.py12 # Create an Article.
MEDIUMtests/many_to_one_null/tests.py15 # Create an Article via the Reporter object.
MEDIUMtests/many_to_one_null/tests.py17 # Create an Article with no Reporter by passing "reporter=None".
MEDIUMtests/contenttypes_tests/test_models.py285 # Create a stale ContentType that matches the name of an existing
MEDIUMtests/admin_views/tests.py6736 # Create a new user to ensure that no extra permissions have been set.
MEDIUMtests/schema/tests.py4763 # Create the table
MEDIUMtests/schema/tests.py4769 # Create a row
MEDIUMtests/schema/tests.py4787 # Create the table
MEDIUMtests/schema/tests.py4793 # Create a row
MEDIUMtests/schema/tests.py4871 # Create the table
MEDIUMtests/schema/tests.py4874 # Create a row
MEDIUMtests/schema/tests.py4956 # Create the table
MEDIUMtests/schema/tests.py4959 # Create a row
295 more matches not shown…
Cross-Language Confusion123 hits · 724 pts
SeverityFileLineSnippet
HIGHtests/fixtures_regress/tests.py717 [{"fields": {"main": null, "name": "Amazon"},
HIGHtests/fixtures_regress/tests.py719 {"fields": {"main": null, "name": "Borders"},
HIGHtests/template_tests/test_context.py21 self.assertEqual(c.push(), {})
HIGHtests/template_tests/test_context.py32 with c.push():
HIGHtests/template_tests/test_context.py37 with c.push(a=3):
HIGHtests/template_tests/test_context.py54 with c.push(Context({"a": 3})):
HIGHtests/template_tests/test_context.py66 c.push(Context({"b": 2}))
HIGHtests/template_tests/test_context.py67 c.push(Context({"c": 3, "d": {"z": "26"}}))
HIGHtests/template_tests/test_context.py150 a.push(Context({"z": "8"}))
HIGHtests/template_tests/test_context.py220 c.push({"a": 2})
HIGHtests/template_tests/test_context.py231 c.push({"b": 2})
HIGHtests/template_tests/test_context.py124 test_context.push()
HIGHtests/template_tests/test_context.py147 Context.push() with a Context argument should work.
HIGHtests/db_functions/text/test_left.py19 # If alias is null, set it to the first 2 lower characters of the name.
HIGHtests/db_functions/text/test_right.py20 # If alias is null, set it to the first 2 lower characters of the name.
HIGHtests/db_functions/text/test_substr.py20 # If alias is null, set to first 5 lower characters of the name.
HIGHtests/inspectdb/tests.py596 CREATE TABLE inspectdb_partition_parent (name text not null)
HIGHtests/queries/tests.py3112 self.assertSequenceEqual(Related.objects.filter(custom__isnull=True), [null])
HIGHtests/nested_foreign_keys/tests.py15# with 2 relations. The first relation may be null, while the second is
HIGHtests/serializers/test_jsonl.py18 '{"pk": null,"model": "serializers.category","fields": {"name": "Reference"}}',
HIGHtests/serializers/test_jsonl.py238 '{"pk": 1,"model": "serializers.m2mdata","fields": {"data": null}}'
HIGHtests/serializers/test_json.py22 "pk": null,
HIGHtests/serializers/test_json.py270 "fields": {"data": null}
HIGHtests/many_to_one/tests.py150 # Funny case - because the ForeignKey cannot be null,
HIGHtests/many_to_one/tests.py194 # Because the ForeignKey cannot be null, existing members of the set
HIGHtests/many_to_one/tests.py624 # Assigning None succeeds if field is null=True.
HIGHtests/model_fields/test_field_flags.py221 self.assertFalse(AllFieldsModel._meta.get_field("m2m").null)
HIGHtests/model_fields/test_field_flags.py222 self.assertTrue(AllFieldsModel._meta.get_field("reverse2").null)
HIGHtests/model_fields/test_jsonfield.py190 '[{"fields": {"value": %s}, "model": "model_fields.jsonmodel", "pk": null}]'
HIGHtests/model_fields/test_jsonfield.py194 ({"a": "b", "c": None}, '{"a": "b", "c": null}'),
HIGHtests/model_fields/test_uuid.py239 '"model": "model_fields.uuidmodel", "pk": null}]'
HIGHtests/model_fields/test_uuid.py242 '[{"fields": {"field": null}, '
HIGHtests/model_fields/test_uuid.py243 '"model": "model_fields.nullableuuidmodel", "pk": null}]'
HIGHtests/model_fields/test_durationfield.py56 '"pk": null}]'
HIGHtests/one_to_one/tests.py213 # Assigning None succeeds if field is null=True.
HIGHtests/one_to_one/tests.py279 # Assigning None succeeds if field is null=True.
HIGHtests/expressions/tests.py2851 (AutoField, Combinable.ADD, null),
HIGHtests/expressions/tests.py2852 (DecimalField, Combinable.ADD, null),
HIGHtests/expressions/tests.py2853 (FloatField, Combinable.ADD, null),
HIGHtests/expressions/tests.py2854 (IntegerField, Combinable.ADD, null),
HIGHtests/expressions/tests.py2855 (IntegerField, Combinable.SUB, null),
HIGHtests/expressions/tests.py2856 (null, Combinable.ADD, IntegerField),
HIGHtests/expressions/tests.py2858 (DateField, Combinable.ADD, null),
HIGHtests/expressions/tests.py2859 (DateTimeField, Combinable.ADD, null),
HIGHtests/expressions/tests.py2860 (DurationField, Combinable.ADD, null),
HIGHtests/expressions/tests.py2861 (TimeField, Combinable.ADD, null),
HIGHtests/expressions/tests.py2862 (TimeField, Combinable.SUB, null),
HIGHtests/expressions/tests.py2863 (null, Combinable.ADD, DateTimeField),
HIGHtests/expressions/tests.py2864 (DateField, Combinable.SUB, null),
HIGHtests/field_defaults/tests.py72 self.assertEqual(obj1.null, 1.1)
HIGHtests/field_defaults/tests.py76 self.assertIsNone(obj2.null)
HIGHtests/postgres_tests/test_ranges.py575 '"bigints": null, "timestamps": '
HIGHtests/postgres_tests/test_ranges.py578 '"timestamps_inner": null, '
HIGHtests/postgres_tests/test_ranges.py582 '\\"bounds\\": \\"[)\\"}", "dates_inner": null }, '
HIGHtests/postgres_tests/test_ranges.py583 '"model": "postgres_tests.rangesmodel", "pk": null}]'
HIGHtests/postgres_tests/test_array.py1031 '[{"fields": {"field": "[\\"1\\", \\"2\\", null]"}, '
HIGHtests/postgres_tests/test_array.py1032 '"model": "postgres_tests.integerarraymodel", "pk": null}]'
HIGHtests/postgres_tests/test_hstore.py392 value = field.clean('{"a": null}')
HIGHtests/gis_tests/gdal_tests/test_geom.py396 self.assertTrue(d1.geos.equals(d2.geos))
HIGHtests/gis_tests/gdal_tests/test_geom.py398 d1.geos.equals((a - b).geos)
63 more matches not shown…
Cross-File Repetition132 hits · 660 pts
SeverityFileLineSnippet
HIGH…emplate_tests/syntax_tests/i18n/test_blocktranslate.py0simple baseline behavior with one locale for all the supported i18n constructs.
HIGH…sts/template_tests/syntax_tests/i18n/test_translate.py0simple baseline behavior with one locale for all the supported i18n constructs.
HIGH…late_tests/syntax_tests/i18n/test_underscore_syntax.py0simple baseline behavior with one locale for all the supported i18n constructs.
HIGHtests/db_functions/datetime/test_now.py0lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
HIGHtests/db_functions/comparison/test_coalesce.py0lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
HIGHtests/db_functions/text/test_concat.py0lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
HIGHtests/forms_tests/tests/test_forms.py0<li><ul class="errorlist"><li>this field is required.</li></ul> username: <input type="text" name="username" maxlength="
HIGHtests/forms_tests/tests/test_forms.py0<li><ul class="errorlist"><li>this field is required.</li></ul> username: <input type="text" name="username" maxlength="
HIGHtests/forms_tests/tests/test_forms.py0<li><ul class="errorlist"><li>this field is required.</li></ul> username: <input type="text" name="username" maxlength="
HIGHtests/forms_tests/tests/test_forms.py0<li><ul class="errorlist"><li>this field is required.</li></ul> username: <input type="text" name="username" maxlength="
HIGHtests/forms_tests/tests/test_forms.py0<select name="is_cool"> <option value="unknown" selected>unknown</option> <option value="true">yes</option> <option valu
HIGHtests/forms_tests/tests/test_forms.py0<select name="is_cool"> <option value="unknown" selected>unknown</option> <option value="true">yes</option> <option valu
HIGHtests/forms_tests/tests/test_forms.py0<select name="is_cool"> <option value="unknown" selected>unknown</option> <option value="true">yes</option> <option valu
HIGH…sts/forms_tests/widget_tests/test_nullbooleanselect.py0<select name="is_cool"> <option value="unknown" selected>unknown</option> <option value="true">yes</option> <option valu
HIGH…sts/forms_tests/widget_tests/test_nullbooleanselect.py0<select name="is_cool"> <option value="unknown" selected>unknown</option> <option value="true">yes</option> <option valu
HIGH…sts/forms_tests/widget_tests/test_nullbooleanselect.py0<select name="is_cool"> <option value="unknown" selected>unknown</option> <option value="true">yes</option> <option valu
HIGHtests/forms_tests/tests/test_forms.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true" selected>yes</option> <option valu
HIGHtests/forms_tests/tests/test_forms.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true" selected>yes</option> <option valu
HIGHtests/forms_tests/tests/test_forms.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true" selected>yes</option> <option valu
HIGH…sts/forms_tests/widget_tests/test_nullbooleanselect.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true" selected>yes</option> <option valu
HIGH…sts/forms_tests/widget_tests/test_nullbooleanselect.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true" selected>yes</option> <option valu
HIGH…sts/forms_tests/widget_tests/test_nullbooleanselect.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true" selected>yes</option> <option valu
HIGHtests/forms_tests/tests/test_forms.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true">yes</option> <option value="false"
HIGHtests/forms_tests/tests/test_forms.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true">yes</option> <option value="false"
HIGHtests/forms_tests/tests/test_forms.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true">yes</option> <option value="false"
HIGH…sts/forms_tests/widget_tests/test_nullbooleanselect.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true">yes</option> <option value="false"
HIGH…sts/forms_tests/widget_tests/test_nullbooleanselect.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true">yes</option> <option value="false"
HIGH…sts/forms_tests/widget_tests/test_nullbooleanselect.py0<select name="is_cool"> <option value="unknown">unknown</option> <option value="true">yes</option> <option value="false"
HIGHtests/forms_tests/tests/test_input_formats.py0timefields with manually specified input formats can accept those formats
HIGHtests/forms_tests/tests/test_input_formats.py0timefields with manually specified input formats can accept those formats
HIGHtests/forms_tests/tests/test_input_formats.py0timefields with manually specified input formats can accept those formats
HIGHtests/forms_tests/tests/test_input_formats.py0localized timefields with manually specified input formats can accept those formats.
HIGHtests/forms_tests/tests/test_input_formats.py0localized timefields with manually specified input formats can accept those formats.
HIGHtests/forms_tests/tests/test_input_formats.py0localized timefields with manually specified input formats can accept those formats.
HIGHtests/forms_tests/tests/test_input_formats.py0datefields with manually specified input formats can accept those formats
HIGHtests/forms_tests/tests/test_input_formats.py0datefields with manually specified input formats can accept those formats
HIGHtests/forms_tests/tests/test_input_formats.py0datefields with manually specified input formats can accept those formats
HIGHtests/forms_tests/tests/test_input_formats.py0localized datefields with manually specified input formats can accept those formats.
HIGHtests/forms_tests/tests/test_input_formats.py0localized datefields with manually specified input formats can accept those formats.
HIGHtests/forms_tests/tests/test_input_formats.py0localized datefields with manually specified input formats can accept those formats.
HIGHtests/forms_tests/tests/test_input_formats.py0datetimefields with manually specified input formats can accept those formats
HIGHtests/forms_tests/tests/test_input_formats.py0datetimefields with manually specified input formats can accept those formats
HIGHtests/forms_tests/tests/test_input_formats.py0datetimefields with manually specified input formats can accept those formats
HIGHtests/forms_tests/tests/test_input_formats.py0localized datetimefields with manually specified input formats can accept those formats.
HIGHtests/forms_tests/tests/test_input_formats.py0localized datetimefields with manually specified input formats can accept those formats.
HIGHtests/forms_tests/tests/test_input_formats.py0localized datetimefields with manually specified input formats can accept those formats.
HIGHtests/forms_tests/widget_tests/test_dateinput.py0use 'format' to change the way a value is displayed.
HIGHtests/forms_tests/widget_tests/test_timeinput.py0use 'format' to change the way a value is displayed.
HIGHtests/forms_tests/widget_tests/test_datetimeinput.py0use 'format' to change the way a value is displayed.
HIGHtests/forms_tests/widget_tests/test_select.py0if the value corresponds to a label (but not to an option value), none of the options are selected.
HIGHtests/forms_tests/widget_tests/test_radioselect.py0if the value corresponds to a label (but not to an option value), none of the options are selected.
HIGHtests/forms_tests/widget_tests/test_selectmultiple.py0if the value corresponds to a label (but not to an option value), none of the options are selected.
HIGHtests/forms_tests/widget_tests/test_select.py0<select name="num"> <option value="1">1</option> <option value="2" selected>2</option> <option value="3">3</option> </se
HIGHtests/forms_tests/widget_tests/test_select.py0<select name="num"> <option value="1">1</option> <option value="2" selected>2</option> <option value="3">3</option> </se
HIGHtests/forms_tests/widget_tests/test_select.py0<select name="num"> <option value="1">1</option> <option value="2" selected>2</option> <option value="3">3</option> </se
HIGHtests/forms_tests/widget_tests/test_select.py0<select name="num"> <option value="1">1</option> <option value="2" selected>2</option> <option value="3">3</option> </se
HIGHtests/forms_tests/widget_tests/test_selectmultiple.py0<select multiple name="nums"> <option value="1">1</option> <option value="2" selected>2</option> <option value="3">3</op
HIGHtests/forms_tests/widget_tests/test_selectmultiple.py0<select multiple name="nums"> <option value="1">1</option> <option value="2" selected>2</option> <option value="3">3</op
HIGHtests/forms_tests/widget_tests/test_selectmultiple.py0<select multiple name="nums"> <option value="1">1</option> <option value="2" selected>2</option> <option value="3">3</op
HIGHtests/view_tests/tests/test_csrf.py0the template is loaded directly, not via a template loader, and should be opened as utf-8 charset as is the default spec
72 more matches not shown…
Unused Imports600 hits · 511 pts
SeverityFileLineSnippet
LOWtests/model_forms/models.py167
LOWtests/fixtures_regress/tests.py59
LOWtests/composite_pk/models/__init__.py1
LOWtests/composite_pk/models/__init__.py1
LOWtests/composite_pk/models/__init__.py1
LOWtests/composite_pk/models/__init__.py1
LOWtests/composite_pk/models/__init__.py1
LOWtests/composite_pk/models/__init__.py1
LOWtests/auth_tests/backend_alias.py2
LOWtests/auth_tests/models/__init__.py1
LOWtests/auth_tests/models/__init__.py2
LOWtests/auth_tests/models/__init__.py2
LOWtests/auth_tests/models/__init__.py2
LOWtests/auth_tests/models/__init__.py2
LOWtests/auth_tests/models/__init__.py8
LOWtests/auth_tests/models/__init__.py9
LOWtests/auth_tests/models/__init__.py10
LOWtests/auth_tests/models/__init__.py11
LOWtests/auth_tests/models/__init__.py12
LOWtests/auth_tests/models/__init__.py13
LOWtests/auth_tests/models/__init__.py13
LOWtests/auth_tests/models/__init__.py14
LOWtests/auth_tests/models/__init__.py15
LOWtests/auth_tests/models/__init__.py16
LOWtests/auth_tests/models/__init__.py16
LOWtests/auth_tests/models/__init__.py17
LOWtests/auth_tests/models/__init__.py18
LOWtests/auth_tests/models/__init__.py19
LOWtests/auth_tests/models/__init__.py19
LOWtests/auth_tests/models/__init__.py19
LOWtests/auth_tests/models/__init__.py20
LOWtests/foreign_object/models/__init__.py1
LOWtests/foreign_object/models/__init__.py1
LOWtests/foreign_object/models/__init__.py1
LOWtests/foreign_object/models/__init__.py1
LOWtests/foreign_object/models/__init__.py1
LOWtests/foreign_object/models/__init__.py2
LOWtests/foreign_object/models/__init__.py2
LOWtests/foreign_object/models/__init__.py2
LOWtests/foreign_object/models/__init__.py2
LOWtests/foreign_object/models/__init__.py3
LOWtests/foreign_object/models/__init__.py4
LOWtests/foreign_object/models/__init__.py4
LOWtests/foreign_object/models/__init__.py4
LOWtests/foreign_object/models/__init__.py4
LOWtests/foreign_object/models/__init__.py4
LOWtests/template_tests/broken_tag.py1
LOWtests/urlpatterns_reverse/views.py26
LOWtests/forms_tests/field_tests/test_filefield.py11
LOWtests/invalid_models_tests/test_ordinary_fields.py843
LOW…_backends/apps/importerror/templatetags/broken_tags.py1
LOWtests/admin_scripts/broken_app/models.py1
LOWtests/admin_scripts/simple_app/models.py1
LOWtests/admin_scripts/complex_app/models/__init__.py1
LOWtests/admin_scripts/complex_app/models/__init__.py2
LOWtests/serializers/test_deserialization.py16
LOWtests/serializers/models/__init__.py1
LOWtests/serializers/models/__init__.py2
LOWtests/serializers/models/__init__.py3
LOWtests/serializers/models/__init__.py4
540 more matches not shown…
Deep Nesting431 hits · 392 pts
SeverityFileLineSnippet
LOWtests/runtests.py108
LOWtests/runtests.py444
LOWtests/test_runner/tests.py772
LOWtests/pagination/tests.py159
LOWtests/pagination/tests.py594
LOWtests/pagination/tests.py681
LOWtests/auth_tests/test_forms.py1733
LOWtests/auth_tests/test_hashers.py510
LOWtests/auth_tests/test_hashers.py525
LOWtests/auth_tests/test_hashers.py555
LOWtests/auth_tests/test_auth_backends.py699
LOWtests/transaction_hooks/tests.py191
LOWtests/transaction_hooks/tests.py204
LOWtests/transaction_hooks/tests.py217
LOWtests/admin_filters/tests.py1385
LOWtests/db_functions/datetime/test_extract_trunc.py1837
LOWtests/cache/tests.py726
LOWtests/update/tests.py235
LOWtests/urlpatterns_reverse/tests.py687
LOWtests/mail/test_deprecated.py227
LOWtests/mail/test_deprecated.py449
LOWtests/mail/test_backends.py196
LOWtests/mail/tests.py980
LOWtests/mail/tests.py1412
LOWtests/mail/tests.py2457
LOWtests/mail/tests.py2482
LOWtests/forms_tests/widget_tests/test_selectdatewidget.py597
LOWtests/backends/postgresql/tests.py37
LOWtests/backends/postgresql/tests.py95
LOWtests/backends/oracle/test_creation.py65
LOWtests/backends/sqlite/test_introspection.py11
LOWtests/backends/base/test_client.py20
LOWtests/backends/base/test_base.py423
LOWtests/file_storage/tests.py831
LOWtests/async/test_async_queryset.py228
LOWtests/select_for_update/tests.py395
LOWtests/select_for_update/tests.py421
LOWtests/queries/test_qs_combinators.py772
LOWtests/queries/test_qs_combinators.py821
LOWtests/queries/test_explain.py15
LOWtests/queries/test_explain.py80
LOWtests/introspection/tests.py362
LOWtests/urlpatterns/tests.py260
LOWtests/admin_views/test_skip_link_to_content.py131
LOWtests/admin_views/tests.py338
LOWtests/admin_views/tests.py369
LOWtests/schema/tests.py146
LOWtests/schema/tests.py269
LOWtests/schema/tests.py5911
LOWtests/admin_scripts/tests.py62
LOWtests/transactions/tests.py116
LOWtests/transactions/tests.py155
LOWtests/transactions/tests.py196
LOWtests/transactions/tests.py216
LOWtests/transactions/tests.py280
LOWtests/transactions/tests.py304
LOWtests/transactions/tests.py453
LOWtests/utils_tests/test_autoreload.py550
LOWtests/utils_tests/test_autoreload.py570
LOWtests/utils_tests/test_html.py40
371 more matches not shown…
Excessive Try-Catch Wrapping228 hits · 265 pts
SeverityFileLineSnippet
LOWtests/middleware/views.py88 except Exception:
MEDIUMtests/middleware/views.py85def csp_500(request):
MEDIUMtests/asgi/tests.py317def post_view(request):
LOWtests/asgi/tests.py324 except Exception as e:
MEDIUMtests/cache/tests.py689def _perform_cull_test(self, cull_cache_name, initial_count, final_count):
LOWtests/cache/tests.py1666 except Exception:
LOWtests/file_uploads/tests.py759 except Exception as err:
LOWtests/file_uploads/tests.py779 except Exception as err:
LOWtests/forms_tests/field_tests/test_datefield.py217 except Exception as e:
LOWtests/backends/tests.py430 except Exception as e:
LOWtests/backends/tests.py504 except Exception:
LOWtests/backends/tests.py881 except Exception as e:
LOWtests/file_storage/tests.py749 except Exception:
MEDIUMtests/view_tests/views.py54def get(self, request):
MEDIUMtests/view_tests/views.py212def async_sensitive_view_nested(request):
MEDIUMtests/view_tests/views.py239def sensitive_args_function_caller(request):
MEDIUMtests/view_tests/views.py261def sensitive_kwargs_function_caller(request):
MEDIUMtests/view_tests/views.py379def async_method_nested(self, request):
LOWtests/view_tests/views.py40 except Exception:
LOWtests/view_tests/views.py49 except Exception:
LOWtests/view_tests/views.py57 except Exception:
LOWtests/view_tests/views.py157 except Exception:
LOWtests/view_tests/views.py175 except Exception:
LOWtests/view_tests/views.py193 except Exception:
LOWtests/view_tests/views.py215 except Exception:
LOWtests/view_tests/views.py233 except Exception:
LOWtests/view_tests/views.py246 except Exception:
LOWtests/view_tests/views.py268 except Exception:
LOWtests/view_tests/views.py308 except Exception:
LOWtests/view_tests/views.py330 except Exception:
LOWtests/view_tests/views.py347 except Exception:
LOWtests/view_tests/views.py363 except Exception:
LOWtests/view_tests/views.py382 except Exception:
LOWtests/view_tests/views.py409 except Exception:
LOWtests/view_tests/views.py99 except Exception:
MEDIUMtests/view_tests/tests/test_debug.py623def test_sharing_traceback(self):
MEDIUMtests/view_tests/tests/test_debug.py768def test_mid_stack_exception_without_traceback(self):
MEDIUMtests/view_tests/tests/test_debug.py912def test_reporting_frames_without_source(self):
MEDIUMtests/view_tests/tests/test_debug.py947def test_reporting_frames_source_not_match(self):
MEDIUMtests/view_tests/tests/test_debug.py987def test_reporting_frames_for_cyclic_reference(self):
LOWtests/view_tests/tests/test_debug.py699 except Exception as exc:
LOWtests/view_tests/tests/test_debug.py703 except Exception:
LOWtests/view_tests/tests/test_debug.py740 except Exception as err:
LOWtests/view_tests/tests/test_debug.py745 except Exception:
LOWtests/view_tests/tests/test_debug.py772 except Exception as exc:
LOWtests/view_tests/tests/test_debug.py776 except Exception:
LOWtests/view_tests/tests/test_debug.py812 except Exception:
LOWtests/view_tests/tests/test_debug.py997 except Exception:
LOWtests/view_tests/tests/test_debug.py1077 except Exception:
LOWtests/view_tests/tests/test_debug.py1089 except Exception:
LOWtests/view_tests/tests/test_debug.py1108 except Exception:
LOWtests/view_tests/tests/test_debug.py327 except Exception:
LOWtests/view_tests/tests/test_debug.py855 except Exception:
LOWtests/view_tests/tests/test_debug.py918 except Exception:
LOWtests/view_tests/tests/test_debug.py953 except Exception:
LOWtests/view_tests/tests/test_debug.py1126 except Exception:
LOWtests/view_tests/tests/test_debug.py1142 except Exception:
LOWtests/view_tests/tests/test_debug.py1158 except Exception:
LOWtests/view_tests/tests/test_debug.py1349 except Exception:
MEDIUMtests/basic/tests.py736def deleter():
168 more matches not shown…
Fake / Example Data146 hits · 154 pts
SeverityFileLineSnippet
LOWtests/generic_views/test_edit.py155 {"name": "John Doe", "slug": "john-doe"},
LOWtests/generic_views/test_edit.py158 pk = Author.objects.get(name="John Doe").pk
LOWtests/generic_views/test_edit.py314 {"name": "John Doe", "slug": "john-doe"},
LOWtests/generic_views/test_edit.py317 pk = Author.objects.get(name="John Doe").pk
LOWtests/expressions_case/tests.py1509 name="Jane Doe",
LOWtests/expressions_case/tests.py1533 [("Jane Doe", "0%"), ("James Smith", "5%"), ("Jack Black", "10%")],
LOWtests/expressions_case/tests.py1548 [("Jane Doe", "5%"), ("James Smith", "0%"), ("Jack Black", "10%")],
LOWtests/expressions_case/tests.py1564 [("Jane Doe", "G"), ("James Smith", "R"), ("Jack Black", "P")],
LOWtests/model_forms/tests.py274 form = modelform_factory(Person, fields="__all__")({"name": "John Doe"})
LOWtests/model_forms/tests.py2463 author = Author.objects.create(publication=publication, full_name="John Doe")
LOWtests/model_forms/tests.py2464 form = AuthorForm({"publication": "", "full_name": "John Doe"}, instance=author)
LOWtests/model_forms/tests.py2482 author = Author1.objects.create(publication=publication, full_name="John Doe")
LOWtests/model_forms/tests.py2483 form = AuthorForm({"publication": "", "full_name": "John Doe"}, instance=author)
LOWtests/model_forms/tests.py2082 "article": "lorem ipsum",
LOWtests/model_forms/tests.py2113 "article": "lorem ipsum",
LOWtests/auth_tests/test_forms.py1236 data = {"email": "foo@bar.com"}
LOWtests/auth_tests/test_management.py1253 "email": "test@test.com",
LOWtests/auth_tests/test_views.py1755 username="uuid", email="foo@bar.com", password="test"
LOWtests/auth_tests/test_remote_user.py456 self.email_header: "user@example.com",
LOWtests/auth_tests/test_remote_user.py460 self.assertEqual(response.context["user"].email, "user@example.com")
LOWtests/auth_tests/test_remote_user.py464 self.assertEqual(newuser.email, "user@example.com")
LOWtests/auth_tests/test_remote_user.py482 self.email_header.removeprefix("HTTP_"): "user@example.com",
LOWtests/auth_tests/test_remote_user.py486 self.assertEqual(response.context["user"].email, "user@example.com")
LOWtests/auth_tests/test_remote_user.py490 self.assertEqual(newuser.email, "user@example.com")
LOWtests/auth_tests/test_models.py162 email="test@test.com",
LOWtests/auth_tests/test_models.py173 email="test@test.com",
LOWtests/auth_tests/test_models.py182 email="test@test.com",
LOWtests/auth_tests/test_models.py191 email="test@test.com",
LOWtests/auth_tests/test_models.py522 user = User.objects.create(username="foo", email="foo@bar.com")
LOWtests/auth_tests/test_models.py269 user = User(email="foo@bar.com")
LOWtests/auth_tests/test_models.py293 self.assertEqual(user.email, "foo@bar.com")
LOWtests/bulk_create/models.py127 email_field = models.EmailField(null=True, default="user@example.com")
LOWtests/generic_inline_admin/tests.py266 "name": "John Doe",
LOWtests/template_tests/syntax_tests/test_lorem.py12 self.assertEqual(output, "lorem ipsum dolor")
LOWtests/db_functions/datetime/test_now.py12 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
LOWtests/db_functions/datetime/test_now.py12 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
LOWtests/db_functions/comparison/test_coalesce.py9 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
LOWtests/db_functions/comparison/test_coalesce.py9 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
LOWtests/db_functions/text/test_concat.py13 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
LOWtests/db_functions/text/test_concat.py13 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
LOWtests/model_inheritance/tests.py86 post = Post.objects.create(title="Lorem Ipsum")
LOWtests/mail/test_sendtestemail.py7 ADMINS=["admin@example.com", "admin_and_manager@example.com"],
LOWtests/mail/test_sendtestemail.py83 "admin@example.com",
LOWtests/mail/test_sendtestemail.py107 "admin@example.com",
LOWtests/mail/tests.py2538 @override_settings(ADMINS=["admin@example.com"], MANAGERS=["manager@example.com"])
LOWtests/mail/tests.py2443 @override_settings(ADMINS=["admin@example.com"], MANAGERS=["manager@example.com"])
LOWtests/mail/tests.py2591 @override_settings(ADMINS=["admin@example.com"], MANAGERS=["manager@example.com"])
LOWtests/forms_tests/tests/test_forms.py1233 {"name": "John Doe"}, initial={"birthday": datetime.date(1974, 8, 16)}
LOWtests/forms_tests/tests/test_forms.py1235 f2 = PersonFormFieldInitial({"name": "John Doe"})
LOWtests/forms_tests/tests/test_forms.py1240 {"birthday": datetime.date(1974, 8, 16), "name": "John Doe"},
LOWtests/forms_tests/tests/test_forms.py1244 data = {"name": "John Doe", "birthday": "1984-11-10"}
LOWtests/forms_tests/tests/test_forms.py1251 {"birthday": datetime.date(1974, 8, 16), "name": "John Doe"},
LOWtests/forms_tests/tests/test_forms.py2870 name = CharField(initial=lambda: "John Doe", disabled=True)
LOWtests/forms_tests/tests/test_forms.py2874 self.assertEqual(form["name"].value(), "John Doe")
LOWtests/forms_tests/tests/test_forms.py2879 self.assertEqual(form["name"].value(), "John Doe")
LOWtests/view_tests/tests/test_debug.py1497 with self.settings(ADMINS=["admin@example.com"]):
LOWtests/view_tests/tests/test_debug.py1534 with self.settings(ADMINS=["admin@example.com"]):
LOWtests/view_tests/tests/test_debug.py1578 with self.settings(ADMINS=["admin@example.com"]):
LOWtests/view_tests/media/long-line.txt1lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqu
LOWtests/view_tests/media/long-line.txt1lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqu
86 more matches not shown…
Over-Commented Block85 hits · 84 pts
SeverityFileLineSnippet
LOWtests/test_sqlite.py1# This is an example test settings file for use with the Django test suite.
LOWtests/asgi/tests.py401 scope = self.async_request_factory._base_scope(path="/")
LOWtests/migrate_signals/models.py1# This module has to exist, otherwise pre/post_migrate aren't sent for the
LOWtests/requests_tests/tests.py981 # 3. main_stream.read(1) -- BoundaryIter.__init__ probe, file field
LOWtests/admin_changelist/tests.py1281 different users must not result in one user's edits creating a new
LOWtests/nested_foreign_keys/tests.py21# Model B
LOW…lates/project_template/additional_dir/requirements.txt1# some file for {{ project_name }} test project
LOW…templates/project_template/additional_dir/localized.py1# Regression for #22699.
LOWtests/i18n/test_compilation.py201 os_walk_results = [
LOWtests/gis_tests/layermap/tests.py221 # has the effect of ignoring the spatial reference check (because
LOWtests/gis_tests/distapp/tests.py441 """
LOWtests/gis_tests/distapp/tests.py501
LOWtests/gis_tests/distapp/tests.py541 self.assertAlmostEqual(distance, city.distance.m, tol)
LOWdocs/conf.py1# Django documentation build configuration file, created by
LOWdocs/conf.py21# RuntimeError: maximum recursion depth exceeded while pickling an object
LOWdocs/conf.py161# There are two options for replacing |today|: either, you set today to some
LOWdocs/conf.py201suppress_warnings = ["app.add_directive", "epub.duplicated_toc_entry"]
LOWdocs/conf.py221# A shorter title for the navigation bar. Default is the same as html_title.
LOWdocs/conf.py241
LOWdocs/conf.py261# If true, links to the reST sources are added to the pages.
LOWdocs/conf.py401# or en if the language is not set.
LOWdocs/conf.py421# The format is a list of tuples containing the path and title.
LOWdocs/ref/class-based-views/generic-display.txt21 * :class:`django.views.generic.base.TemplateResponseMixin`
LOWscripts/manage_translations.py1#!/usr/bin/env python
LOWdjango/middleware/csrf.py441 )
LOWdjango/forms/fields.py121 # label -- A verbose name for this field, for use in displaying this
LOWdjango/core/serializers/__init__.py201 # Also add a dependency for any simple M2M relation with a model
LOWdjango/template/defaulttags.py641 <tr class="{{ rowcolors }}">{% include "subtemplate.html " %}</tr>
LOWdjango/utils/encoding.py121 # reserved = gen-delims / sub-delims
LOWdjango/contrib/admin/static/admin/js/calendar.js121 const todayDay = today.getDate();
LOW…ntrib/admin/static/admin/js/admin/DateTimeShortcuts.js161 clock_link.setAttribute("aria-labelledby", clockIconId);
LOW…ntrib/admin/static/admin/js/admin/DateTimeShortcuts.js361 // role="dialog" aria-label="Choose a Date">
LOWdjango/contrib/sessions/backends/file.py141 if not must_create:
LOWdjango/contrib/humanize/templatetags/humanize.py41 else:
LOWdjango/contrib/humanize/templatetags/humanize.py221 # Translators: delta will contain a string like '2 months' or
LOWdjango/contrib/gis/measure.py1# Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz>
LOWdjango/contrib/gis/db/backends/postgis/pgraster.py121
LOWdjango/db/backends/oracle/base.py601 # Handle params as a dict with unified query parameters by their
LOWdjango/db/backends/base/features.py261 # Does the database support SQL 2003 FILTER (WHERE ...) in aggregate
LOWdjango/db/backends/base/features.py341 supports_boolean_expr_in_select_clause = True
LOWdjango/db/backends/base/schema.py1041 # will now be used in lieu of an index. The following lines from the
LOWdjango/db/backends/base/schema.py1221 for sql, params in post_actions:
LOWdjango/db/models/options.py341 # Insert the given field in the order in which it was created, using
LOWdjango/db/models/query.py2961 # - reorder_for_init: When select_related descends to a child
LOWdjango/db/models/deletion.py121 self.origin = origin
LOWdjango/db/models/base.py1261 # Ensure that a model instance without a PK hasn't been assigned to
LOWdjango/db/models/fields/files.py181 # the FieldFile API so that users can easily do things like
LOWdjango/db/models/fields/related.py241 errors = []
LOWdjango/db/models/fields/__init__.py101# A guide to Field parameters:
LOWdjango/db/models/fields/__init__.py901 """
LOWdjango/db/models/sql/compiler.py101
LOWdjango/db/models/sql/compiler.py121 # GROUP BY: name, pk
LOWdjango/db/models/sql/query.py721 # alias prefix of the rhs and update current aliases accordingly,
LOWdjango/db/models/sql/query.py2861 # to rel_a would remove a valid match from the query. So, we need
LOWdjango/db/models/sql/query.py2881 # (rel_a__col=1|rel_b__col=2) & rel_a__col__gte=0
LOWdjango/views/templates/technical_500.html41 div.context ol li pre { display:inline; }
LOWdjango/conf/global_settings.py21# on a live site.
LOWdjango/conf/global_settings.py181# Email address that error messages come from.
LOWdjango/conf/global_settings.py241# Whether to append trailing slashes to URLs.
LOWdjango/conf/global_settings.py261
25 more matches not shown…
AI Slop Vocabulary35 hits · 74 pts
SeverityFileLineSnippet
LOWtests/model_forms/tests.py1928 # same fields as the Category model, we can just call the form's save()
LOWtests/get_earliest_or_latest/tests.py188 # "get_latest_by" set -- just pass in the field name manually.
LOWtests/view_tests/views.py148 # Do not just use plain strings for the variables' values in the code
LOWtests/view_tests/views.py166 # Do not just use plain strings for the variables' values in the code
LOWtests/view_tests/views.py184 # Do not just use plain strings for the variables' values in the code so
LOWtests/view_tests/views.py202 # Do not just use plain strings for the variables' values in the code so
LOWtests/view_tests/views.py224 # Do not just use plain strings for the variables' values in the code
LOWtests/view_tests/views.py254 # Do not just use plain strings for the variables' values in the code
LOWtests/view_tests/views.py276 # Do not just use plain strings for the variables' values in the code
LOWtests/view_tests/views.py298 # Do not just use plain strings for the variables' values in the code
LOWtests/view_tests/views.py338 # Do not just use plain strings for the variables' values in the code
LOWtests/view_tests/views.py354 # Do not just use plain strings for the variables' values in the code
LOWtests/view_tests/views.py370 # Do not just use plain strings for the variables' values in the code
LOWtests/view_tests/tests/test_debug.py813 # Custom exception handler, just pass it into ExceptionReporter
LOWtests/model_meta/tests.py281 # should just return an EMPTY_RELATION_TREE.
MEDIUMtests/many_to_one/tests.py406 # Counting in the opposite direction works in conjunction with
LOWtests/queryset_pickle/tests.py61 # can't just use assertEqual(original, unpickled)
MEDIUMtests/postgres_tests/test_indexes.py562 """SearchVector generates IMMUTABLE SQL in order to be indexable."""
MEDIUMtests/gis_tests/geo3d/tests.py51# http://seamless.usgs.gov/products/9arc.php
MEDIUMtests/gis_tests/geo3d/tests.py51# http://seamless.usgs.gov/products/9arc.php
LOWdjango/middleware/cache.py88 # We don't need to update the cache, just return.
LOWdjango/forms/models.py1560 # the property self.choices. In this case, just return self._choices.
MEDIUMdjango/template/base.py569 # When deprecation ends elevate the warning to an error.
LOWdjango/contrib/admin/options.py275 # For any other type of field, just call its formfield() method.
LOWdjango/contrib/admin/options.py1222 # If the action is a callable, just use it.
LOWdjango/http/multipartparser.py229 # This is a post field, we can just set it in the post
LOWdjango/http/multipartparser.py648 # There's nothing left, we should just return and mark as done.
LOWdjango/db/backends/sqlite3/operations.py168 # For consistency with SQLiteCursorWrapper.execute(), just return sql
LOWdjango/db/backends/base/creation.py232 # below, just return and skip it all.
MEDIUMdjango/db/backends/base/base.py99 # Each entry is an (sids, func, robust) tuple, where sids is a set of
MEDIUMdjango/db/backends/base/base.py100 # the active savepoint IDs when this function was registered and robust
LOWdjango/db/models/fields/related_descriptors.py360 # when accessing the attribute we just set.
LOWdjango/db/models/fields/related_descriptors.py642 # query when accessing the attribute we just set.
LOWdjango/db/models/fields/related.py944 # While 'limit_choices_to' might be a callable, simply pass
MEDIUMdjango/db/models/sql/query.py464 # resolving purpose to facilitate their subsequent removal.
Redundant / Tautological Comments40 hits · 64 pts
SeverityFileLineSnippet
LOWtests/model_forms/tests.py2612 # Check if the max_length attribute has been inherited from the model.
LOWtests/auth_tests/test_remote_user.py218 # Set last_login to something so we can determine if it changes.
LOWtests/auth_tests/test_remote_user.py237 # Set last_login to something so we can determine if it changes.
LOWtests/cache/tests.py2236 # Set headers to an empty list.
LOWtests/cache/tests.py2214 # Set headers to an empty list.
LOWtests/cache/tests.py3025 # Set headers to an empty list.
LOWtests/cache/tests.py3047 # Set headers to an empty list.
LOWtests/requests_tests/tests.py1341 # Check if X_FORWARDED_HOST isn't provided.
LOWtests/requests_tests/tests.py1350 # Check if HTTP_HOST isn't provided.
LOWtests/requests_tests/tests.py1358 # Check if HTTP_HOST isn't provided, and we're on a nonstandard port
LOWtests/requests_tests/tests.py1411 # Check if X_FORWARDED_HOST isn't provided.
LOWtests/requests_tests/tests.py1420 # Check if HTTP_HOST isn't provided.
LOWtests/requests_tests/tests.py1428 # Check if HTTP_HOST isn't provided, and we're on a nonstandard port
LOWtests/requests_tests/tests.py1330 # Check if X_FORWARDED_HOST is provided.
LOWtests/requests_tests/tests.py1400 # Check if X_FORWARDED_HOST is provided.
LOWtests/admin_views/tests.py991 # Check if the correct column was selected. 2 is the index of the
LOWtests/model_fields/test_floatfield.py15 # Set value to valid and save
LOWtests/model_fields/test_floatfield.py19 # Set field to object on saved instance
LOWtests/gis_tests/gdal_tests/test_raster.py450 # Check if options used on creation are stored in metadata.
LOWtests/indexes/models.py15 # Set unique to enable model cache.
LOWscripts/verify_release.sh8# Set GPG_KEY to a key fingerprint to import it before verifying, e.g.:
LOWdjango/middleware/common.py51 # Check if we also need to append a slash so we can do it all
LOWdjango/core/validators.py168 # Check if the scheme is valid.
LOWdjango/core/serializers/xml_serializer.py344 # Check if there is a child node named 'None', returning None if so.
LOWdjango/template/base.py1048 # Set this to True for nodes that must be first in the template (although
LOWdjango/utils/log.py307 # Check if the response has already been logged. Multiple requests to log
LOWdjango/contrib/auth/hashers.py464 # Set salt_len to the salt_len of the current parameters because salt
LOWdjango/contrib/admin/options.py1607 # Check if this is an optgroup (label is a sequence
LOWdjango/contrib/gis/gdal/raster/source.py142 # Check if width and height where specified
LOWdjango/contrib/gis/gdal/raster/source.py148 # Check if srid was specified
LOWdjango/contrib/gis/db/backends/spatialite/base.py72 # Check if spatial metadata have been initialized in the database
LOWdjango/contrib/gis/db/models/fields.py198 # Check if input is a candidate for conversion to raster or
LOWdjango/contrib/gis/db/models/lookups.py29 # Check if a band index was passed in the query argument.
LOWdjango/contrib/gis/db/models/lookups.py315 # Check if the second parameter is a band index.
LOWdjango/db/models/base.py2417 # Check if auto-generated name for the field is too long
LOWdjango/db/models/base.py2440 # Check if auto-generated name for the M2M field is too long
LOWdjango/db/models/sql/query.py1851 # Check if we need any joins for concrete inheritance cases (the
LOWdjango/db/models/sql/where.py162 # Check if this node matches nothing or everything.
LOWdjango/apps/config.py124 # Check if there's exactly one AppConfig candidate,
LOWdjango/apps/config.py138 # Check if there's exactly one AppConfig subclass,
Decorative Section Separators6 hits · 18 pts
SeverityFileLineSnippet
MEDIUMdjango/contrib/gis/db/models/lookups.py93# ------------------
MEDIUMdjango/contrib/gis/db/models/lookups.py95# ------------------
MEDIUMdjango/contrib/gis/db/models/lookups.py222# ------------------
MEDIUMdjango/contrib/gis/db/models/lookups.py224# ------------------
MEDIUMdjango/db/backends/base/schema.py1046 # -------------------------------------
MEDIUMdjango/db/backends/base/schema.py1235 # -------------------------------------
Verbosity Indicators6 hits · 14 pts
SeverityFileLineSnippet
LOWdjango/utils/cache.py181 # Step 1: Test the If-Match precondition.
LOWdjango/utils/cache.py185 # Step 2: Test the If-Unmodified-Since precondition.
LOWdjango/utils/cache.py193 # Step 3: Test the If-None-Match precondition.
LOWdjango/utils/cache.py200 # Step 4: Test the If-Modified-Since precondition.
LOWdjango/utils/cache.py209 # Step 5: Test the If-Range precondition (not supported).
LOWdjango/utils/cache.py210 # Step 6: Return original response since there isn't a conditional
Overly Generic Function Names9 hits · 8 pts
SeverityFileLineSnippet
LOWtests/template_tests/test_callables.py69 def my_method(self):
LOWtests/template_tests/test_callables.py92 def my_method(self):
LOWtests/forms_tests/tests/test_forms.py5379 def my_function(method, post_data):
LOWtests/basic/tests.py440 def do_something(self):
LOWtests/admin_checks/tests.py750 def my_function(obj):
LOWtests/sphinx/testdata/package/module.py16 def my_method(self):
LOWtests/sphinx/testdata/package/module.py24def my_function(self):
LOWdjango/views/decorators/debug.py21 def my_function(user):
LOWdjango/views/decorators/debug.py30 def my_function()
Dead Code1 hit · 2 pts
SeverityFileLineSnippet
MEDIUMtests/test_runner/test_parallel.py86
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippet
LOWtests/forms_tests/tests/test_forms.py1833 # self.fields dictionary in __init__(). Don't forget to call