Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add typing #1740

Merged
merged 10 commits into from
Nov 21, 2024
4 changes: 2 additions & 2 deletions lightly/data/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@

# 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

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
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down