Skip to content

Commit 8f4c4bf

Browse files
committed
Code cleanup
1 parent 591845b commit 8f4c4bf

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

superannotate/input_converters/import_to_sa_conversions.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,27 @@
22
Module which will run converters and convert from other
33
annotation formats to superannotate annotation format
44
"""
5-
import glob
65
import logging
7-
import os
86
import shutil
97
from pathlib import Path
8+
109
from .converters.converters import Converter
11-
from ..exceptions import SABaseException
1210

1311
logger = logging.getLogger("superannotate-python-sdk")
1412

1513

1614
def _load_files(path_to_imgs, ptype):
1715
rec_search = str(Path('**') / '*.jpg')
1816
images_gen = Path(path_to_imgs).glob(rec_search)
19-
images = [path for path in images_gen]
17+
images = list(images_gen)
2018

2119
if not images:
2220
logger.warning("Images doesn't exist")
2321

2422
if ptype == 'Pixel':
2523
rec_search = str(Path('**') / '*.png')
2624
masks_gen = Path(path_to_imgs).glob(rec_search)
27-
masks = [path for path in masks_gen]
25+
masks = list(masks_gen)
2826
# if not masks:
2927
# logger.warning("Masks doesn't exist")
3028
else:

0 commit comments

Comments
 (0)