소스 검색

renamed an argument

Dimitri Korsch 3 년 전
부모
커밋
d21c3ccf6a
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  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):