From 8a81266988b10200764b5d66870ce020d6cc4d52 Mon Sep 17 00:00:00 2001 From: Thibaut Decombe Date: Wed, 25 Oct 2023 13:37:01 +0200 Subject: [PATCH] Update allowlist and remove unused ignore --- django-stubs/contrib/auth/forms.pyi | 2 +- django-stubs/db/models/fields/files.pyi | 2 +- scripts/stubtest/allowlist.txt | 63 +++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 2 deletions(-) diff --git a/django-stubs/contrib/auth/forms.pyi b/django-stubs/contrib/auth/forms.pyi index 4b36b5bac..3b673b3e8 100644 --- a/django-stubs/contrib/auth/forms.pyi +++ b/django-stubs/contrib/auth/forms.pyi @@ -104,4 +104,4 @@ class AdminPasswordChangeForm(forms.Form): def clean_password2(self) -> str: ... def save(self, commit: bool = ...) -> AbstractBaseUser: ... @property - def changed_data(self) -> list[str]: ... # type: ignore[override] + def changed_data(self) -> list[str]: ... diff --git a/django-stubs/db/models/fields/files.pyi b/django-stubs/db/models/fields/files.pyi index d13b53f10..bcd2cca9d 100644 --- a/django-stubs/db/models/fields/files.pyi +++ b/django-stubs/db/models/fields/files.pyi @@ -24,7 +24,7 @@ class FieldFile(File): @property def url(self) -> str: ... @property - def size(self) -> int: ... # type:ignore[override] + def size(self) -> int: ... def save(self, name: str, content: File, save: bool = ...) -> None: ... def delete(self, save: bool = ...) -> None: ... @property diff --git a/scripts/stubtest/allowlist.txt b/scripts/stubtest/allowlist.txt index 9a0e2d308..9e8f1d668 100644 --- a/scripts/stubtest/allowlist.txt +++ b/scripts/stubtest/allowlist.txt @@ -151,6 +151,42 @@ django.utils.functional.cached_property.__set__ django.utils.functional.cached_property.name # Ignore @cached_property error "cannot reconcile @property on stub with runtime object" +django.contrib.gis.forms.BaseForm.changed_data +django.contrib.gis.forms.BaseFormSet.forms +django.contrib.gis.forms.BaseFormSet.management_form +django.contrib.gis.forms.BoundField.subwidgets +django.core.files.File.size +django.core.files.base.File.size +django.core.files.storage.FileSystemStorage.base_location +django.core.files.storage.FileSystemStorage.base_url +django.core.files.storage.FileSystemStorage.directory_permissions_mode +django.core.files.storage.FileSystemStorage.file_permissions_mode +django.core.files.storage.FileSystemStorage.location +django.core.files.storage.InMemoryStorage.base_location +django.core.files.storage.InMemoryStorage.base_url +django.core.files.storage.InMemoryStorage.directory_permissions_mode +django.core.files.storage.InMemoryStorage.file_permissions_mode +django.core.files.storage.InMemoryStorage.location +django.core.files.storage.StorageHandler.backends +django.core.files.storage.filesystem.FileSystemStorage.base_location +django.core.files.storage.filesystem.FileSystemStorage.base_url +django.core.files.storage.filesystem.FileSystemStorage.directory_permissions_mode +django.core.files.storage.filesystem.FileSystemStorage.file_permissions_mode +django.core.files.storage.filesystem.FileSystemStorage.location +django.core.files.storage.handler.StorageHandler.backends +django.core.files.storage.memory.InMemoryStorage.base_location +django.core.files.storage.memory.InMemoryStorage.base_url +django.core.files.storage.memory.InMemoryStorage.directory_permissions_mode +django.core.files.storage.memory.InMemoryStorage.file_permissions_mode +django.core.files.storage.memory.InMemoryStorage.location +django.core.handlers.asgi.ASGIRequest.COOKIES +django.core.handlers.asgi.ASGIRequest.GET +django.core.management.commands.loaddata.Command.fixture_dirs +django.core.management.commands.makemessages.BuildFile.is_templatized +django.core.management.commands.makemessages.BuildFile.path +django.core.management.commands.makemessages.BuildFile.work_path +django.core.paginator.Paginator.count +django.core.paginator.Paginator.num_pages django.db.migrations.RenameField.new_name_lower django.db.migrations.RenameField.old_name_lower django.db.migrations.RenameIndex.new_name_lower @@ -176,9 +212,36 @@ django.db.migrations.operations.models.RenameModel.new_name_lower django.db.migrations.operations.models.RenameModel.old_name_lower django.db.migrations.state.ModelState.name_lower django.db.migrations.state.ProjectState.apps +django.db.models.query.RawQuerySet.columns +django.db.models.query.RawQuerySet.model_fields +django.db.models.sql.Query.base_table +django.db.models.sql.compiler.SQLDeleteCompiler.contains_self_reference_subquery +django.db.models.sql.compiler.SQLDeleteCompiler.single_alias +django.db.models.sql.query.Query.base_table +django.db.models.sql.where.WhereNode.contains_aggregate +django.db.models.sql.where.WhereNode.contains_over_clause +django.db.utils.ConnectionRouter.routers +django.forms.BaseForm.changed_data +django.forms.BaseFormSet.forms +django.forms.BaseFormSet.management_form +django.forms.BoundField.subwidgets +django.forms.boundfield.BoundField.subwidgets +django.forms.forms.BaseForm.changed_data +django.forms.formsets.BaseFormSet.forms +django.forms.formsets.BaseFormSet.management_form +django.forms.renderers.EngineMixin.engine +django.forms.renderers.Jinja2.backend django.middleware.csrf.CsrfViewMiddleware.allowed_origin_subdomains django.middleware.csrf.CsrfViewMiddleware.allowed_origins_exact django.middleware.csrf.CsrfViewMiddleware.csrf_trusted_origins_hosts +django.template.Engine.template_context_processors +django.template.Engine.template_loaders +django.template.EngineHandler.templates +django.template.backends.base.BaseEngine.template_dirs +django.template.backends.jinja2.Jinja2.template_context_processors +django.template.engine.Engine.template_context_processors +django.template.engine.Engine.template_loaders +django.template.utils.EngineHandler.templates django.urls.URLPattern.lookup_str django.urls.URLResolver.url_patterns django.urls.URLResolver.urlconf_module