Skip to content

Commit

Permalink
Update typing
Browse files Browse the repository at this point in the history
  • Loading branch information
hugorodgerbrown committed Sep 11, 2023
1 parent 7cf6869 commit 475a0e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions anonymiser/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
from collections import namedtuple
from dataclasses import dataclass
from typing import Any, TypeAlias
from typing import Any, Iterator, TypeAlias

from django.db import models

Expand Down Expand Up @@ -115,7 +115,7 @@ def anonymise_object(self, obj: models.Model) -> None:
output[field.name] = self.anonymise_field(obj, field.name)
self.post_anonymise_object(obj, **output)

def anonymise_queryset(self, queryset: models.QuerySet) -> int:
def anonymise_queryset(self, queryset: Iterator[models.Model]) -> int:
"""Anonymise all objects in the queryset (and SAVE)."""
count = 0
for obj in queryset:
Expand Down

0 comments on commit 475a0e7

Please sign in to comment.