Forráskód Böngészése

removed unused exports and fixed a missing variable

Dimitri Korsch 2 éve
szülő
commit
6218135535

+ 0 - 3
cvdatasets/annotation/base.py

@@ -2,15 +2,12 @@ import abc
 import logging
 import numpy as np
 
-from collections import OrderedDict
-from collections import defaultdict
 from pathlib import Path
 from typing import Tuple
 
 from cvdatasets.annotation import mixins
 from cvdatasets.annotation.files import AnnotationFiles
 from cvdatasets.dataset import Dataset
-from cvdatasets.utils import feature_file_name
 from cvdatasets.utils import pretty_print_dict
 from cvdatasets.utils import read_info_file
 from cvdatasets.utils.decorators import only_with_info

+ 1 - 3
cvdatasets/annotation/types/__init__.py

@@ -1,4 +1,3 @@
-import logging
 import typing
 
 from cvdatasets.annotation.types.file_list import FileListAnnotations
@@ -6,7 +5,6 @@ from cvdatasets.annotation.types.folder_annotations import FolderAnnotations
 from cvdatasets.annotation.types.json_annotations import JSONAnnotations
 
 from cvargparse.utils import BaseChoiceType
-from cvargparse.utils.enumerations import MetaBaseType
 from cvdatasets.utils import read_info_file
 
 
@@ -35,7 +33,7 @@ class AnnotationType(BaseChoiceType):
 
 		else:
 			assert args.dataset in info_file.DATASETS, \
-				f"No information was found about the dataset \"{opts.dataset}\" in the info file \"{opts.data}\""
+				f"No information was found about the dataset \"{args.dataset}\" in the info file \"{args.data}\""
 			annot = cls[ds_info.annotation_type.lower()].value
 
 		return annot.new(args, ds_info=ds_info, **kwargs)