Skip to content

Commit

Permalink
Fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-misuk-valor committed Nov 5, 2024
1 parent 5b2bd20 commit b7d9456
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 30 deletions.

This file was deleted.

2 changes: 1 addition & 1 deletion src/hope_dedup_engine/apps/api/migrations/0010_dedupjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class Migration(migrations.Migration):

dependencies = [
("api", "0009_alter_config_face_distance_threshold"),
("api", "0009_remove_config_face_distance_threshold_config_name_and_more"),
]

operations = [
Expand Down
14 changes: 10 additions & 4 deletions tests/extras/testutils/duplicate_finders.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections.abc import Generator
from collections.abc import Callable, Generator
from itertools import combinations

from hope_dedup_engine.apps.api.deduplication.registry import DuplicateKeyPair
Expand All @@ -11,7 +11,9 @@ class AllDuplicateFinder:
def __init__(self, deduplication_set: DeduplicationSet) -> None:
self.deduplication_set = deduplication_set

def run(self) -> Generator[DuplicateKeyPair, None, None]:
def run(
self, _: Callable[[int], None] | None = None
) -> Generator[DuplicateKeyPair, None, None]:
reference_pks = self.deduplication_set.image_set.values_list(
"reference_pk", flat=True
).order_by("reference_pk")
Expand All @@ -22,7 +24,9 @@ def run(self) -> Generator[DuplicateKeyPair, None, None]:
class NoDuplicateFinder:
weight = 1

def run(self) -> Generator[DuplicateKeyPair, None, None]:
def run(
self, _: Callable[[int], None] | None = None
) -> Generator[DuplicateKeyPair, None, None]:
# empty generator
return
yield
Expand All @@ -31,5 +35,7 @@ def run(self) -> Generator[DuplicateKeyPair, None, None]:
class FailingDuplicateFinder:
weight = 1

def run(self) -> Generator[DuplicateKeyPair, None, None]:
def run(
self, _: Callable[[int], None] | None = None
) -> Generator[DuplicateKeyPair, None, None]:
raise Exception

0 comments on commit b7d9456

Please sign in to comment.