Skip to content

Commit

Permalink
CTX-5783: Fixed linter error (synthetic-image-generator)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vuk Manojlovic committed Aug 20, 2024
1 parent 4048cd4 commit eb35f64
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks/synthetic-image-generator/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Any, Optional
from pathlib import Path
from contextlib import ExitStack
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor, Future
Expand All @@ -19,7 +20,11 @@ def getRandomSamples(dataset: ImageDataset, count: int) -> list[ImageSample]:
return [dataset.samples[i] for i in indexes]


def didGenerateSample(dataset: ImageDataset, future: Future[tuple[Path, CoretexImageAnnotation]]) -> None:
def didGenerateSample(
dataset: ImageDataset,
future: Future[tuple[Path, CoretexImageAnnotation, Optional[dict[str, Any]]]]
) -> None:

try:
imagePath, annotation, metadata = future.result()
generatedSample = dataset.add(imagePath)
Expand Down

0 comments on commit eb35f64

Please sign in to comment.