From 99a7b137c5dbac380dc157623ec8367f6c8d0262 Mon Sep 17 00:00:00 2001 From: Vladislav Tumko <56307628+vectorvp@users.noreply.github.com> Date: Thu, 21 Nov 2024 13:35:36 +0400 Subject: [PATCH] Type data/_utils (#1740) --- lightly/data/_utils.py | 4 ++-- pyproject.toml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lightly/data/_utils.py b/lightly/data/_utils.py index 6d49b59be..9dc67fb61 100644 --- a/lightly/data/_utils.py +++ b/lightly/data/_utils.py @@ -7,9 +7,9 @@ # Copyright (c) 2020. Lightly AG and its affiliates. # All Rights Reserved +from __future__ import annotations import os -from typing import List, Tuple import tqdm.contrib.concurrent as concurrent from PIL import Image, UnidentifiedImageError @@ -17,7 +17,7 @@ from lightly.data import LightlyDataset -def check_images(data_dir: str) -> Tuple[List[str], List[str]]: +def check_images(data_dir: str) -> tuple[list[str], list[str]]: """Identifies corrupt and healthy images in the specified directory. The function attempts to open each image file in the directory to verify diff --git a/pyproject.toml b/pyproject.toml index 405d16f07..1c963caa8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -213,7 +213,6 @@ exclude = '''(?x)( lightly/data/_helpers.py | lightly/data/_image_loaders.py | lightly/data/_video.py | - lightly/data/_utils.py | lightly/data/multi_view_collate.py | lightly/core.py | lightly/api/api_workflow_compute_worker.py |