minor type hint fixes

This commit is contained in:
Nick Sweeting 2024-09-05 23:24:44 -07:00
parent 2e1e1945f2
commit 0e79a8b683
No known key found for this signature in database
2 changed files with 3 additions and 6 deletions

View file

@ -1,7 +1,6 @@
__package__ = 'archivebox.abid_utils'
from typing import Any
from datetime import datetime
from django.contrib import admin, messages
from django.core.exceptions import ValidationError
@ -115,11 +114,11 @@ class ABIDModelAdmin(DjangoObjectActions, admin.ModelAdmin):
return redirect(self.request.path.replace(object_id, object_pk), permanent=False)
except (self.model.DoesNotExist, ValidationError):
pass
return super()._get_obj_does_not_exist_redirect(request, opts, object_id) # type: ignore
return super()._get_obj_does_not_exist_redirect(request, opts, object_id) # type: ignore
def queryset(self, request):
self.request = request
return super().queryset(request)
return super().queryset(request) # type: ignore
def change_view(self, request, object_id, form_url="", extra_context=None):
self.request = request
@ -138,7 +137,7 @@ class ABIDModelAdmin(DjangoObjectActions, admin.ModelAdmin):
return form
def get_formset(self, request, formset=None, obj=None, **kwargs):
formset = super().get_formset(request, formset, obj, **kwargs)
formset = super().get_formset(request, formset, obj, **kwargs) # type: ignore
formset.form.base_fields['created_at'].disabled = True
return formset

View file

@ -31,7 +31,6 @@ dependencies = [
# Extractor Dependencies
"yt-dlp>=2024.8.6", # for: media
# "playwright>=1.43.0; platform_machine != 'armv7l'", # WARNING: playwright doesn't have any sdist, causes trouble on build systems that refuse to install wheel-only packages
"django-signal-webhooks>=0.3.0",
"django-admin-data-views>=0.3.1",
"ulid-py>=1.1.0",
@ -40,7 +39,6 @@ dependencies = [
"django-pydantic-field>=0.3.9",
"django-jsonform>=2.22.0",
"django-stubs>=5.0.2",
# these can be safely omitted when installation subsystem does not provide these as packages (e.g. apt/debian)
# archivebox will automatically load fallback vendored copies bundled via archivebox/vendor/__init__.py
"pydantic-pkgr>=0.1.4",