From 475a0e7f24bc9b60bf478d045f07e2893fcbe920 Mon Sep 17 00:00:00 2001 From: Hugo Rodger-Brown Date: Mon, 11 Sep 2023 09:06:44 +0100 Subject: [PATCH] Update typing --- anonymiser/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anonymiser/models.py b/anonymiser/models.py index 0223b47..8080645 100644 --- a/anonymiser/models.py +++ b/anonymiser/models.py @@ -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 @@ -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: