Skip to content

Commit

Permalink
Use abstract Collection type in update_file_permissions() annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
ababic committed Dec 13, 2024
1 parent 7f0de81 commit 5198943
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from collections.abc import Collection
from typing import TYPE_CHECKING, Any

from django.core.management.base import BaseCommand
Expand Down Expand Up @@ -49,7 +50,7 @@ def handle(self, *args: Any, **options: Any) -> None:
self.update_file_permissions(model, make_public, Privacy.PUBLIC)

def update_file_permissions(
self, model_class: type["PrivateMediaMixin"], items: list["PrivateMediaMixin"], privacy: Privacy
self, model_class: type["PrivateMediaMixin"], items: Collection["PrivateMediaMixin"], privacy: Privacy
) -> None:
"""Update the file permissions for the provided items to reflect the provided privacy status."""
plural = model_class._meta.verbose_name_plural
Expand Down

0 comments on commit 5198943

Please sign in to comment.