Explorar o código

renamed an argument

Dimitri Korsch %!s(int64=3) %!d(string=hai) anos
pai
achega
d21c3ccf6a
Modificáronse 1 ficheiros con 7 adicións e 7 borrados
  1. 7 7
      cvdatasets/annotation/types/__init__.py

+ 7 - 7
cvdatasets/annotation/types/__init__.py

@@ -24,19 +24,19 @@ class AnnotationType(BaseChoiceType):
 	Default = FILE_LIST
 
 	@classmethod
-	def new_annotation(cls, opts: AnnotationArgs, **kwargs):
-		info_file = read_info_file(opts.data)
-		ds_info = info_file.DATASETS[opts.dataset]
+	def new_annotation(cls, args: AnnotationArgs, **kwargs):
+		info_file = read_info_file(args.data)
+		ds_info = info_file.DATASETS[args.dataset]
 
-		if opts.dataset in cls:
-			annot = cls[opts.dataset].value
+		if args.dataset in cls:
+			annot = cls[args.dataset].value
 
 		else:
-			assert opts.dataset in info_file.DATASETS, \
+			assert args.dataset in info_file.DATASETS, \
 				f"No information was found about the dataset \"{opts.dataset}\" in the info file \"{opts.data}\""
 			annot = cls[ds_info.annotation_type.lower()].value
 
-		return annot.new(opts, ds_info=ds_info, **kwargs)
+		return annot.new(args, ds_info=ds_info, **kwargs)
 
 	@classmethod
 	def as_choices(cls, add_phony=True):