From f2f8925425855bb87ba08514d4451ae87fdec5c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=98=95=E8=BE=B0?= Date: Tue, 6 Jun 2023 14:52:32 +0800 Subject: [PATCH] [FIx] Fix ade20k dataset wrong return typing (#10449) --- mmdet/datasets/ade20k.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mmdet/datasets/ade20k.py b/mmdet/datasets/ade20k.py index 4831baaf5cd..dd49481a55e 100644 --- a/mmdet/datasets/ade20k.py +++ b/mmdet/datasets/ade20k.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import os.path as osp +from typing import List from mmengine import fileio @@ -220,11 +221,11 @@ def __init__(self, super().__init__( img_suffix=img_suffix, seg_map_suffix=seg_map_suffix, **kwargs) - def load_data_list(self) -> list[dict]: + def load_data_list(self) -> List[dict]: """Load annotation from directory or annotation file. Returns: - list[dict]: All data info of dataset. + List[dict]: All data info of dataset. """ data_list = [] img_dir = self.data_prefix.get('img_path', None)