aboutsummaryrefslogtreecommitdiff
path: root/configlib
diff options
context:
space:
mode:
Diffstat (limited to 'configlib')
-rw-r--r--configlib/model_impl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/configlib/model_impl.py b/configlib/model_impl.py
index d18611f..38b811a 100644
--- a/configlib/model_impl.py
+++ b/configlib/model_impl.py
@@ -92,11 +92,11 @@ def parse_single_item(val_type: Type[object], val, path):
if issubclass(val_type, (str, int, float)):
# noinspection PyArgumentList
return val_type(val)
- if isinstance(val_type, List):
+ if issubclass(val_type, List):
if len(val_type.__args__) != 1:
raise InvalidConfigTypingException(path + ': List must be supplied exactly one type')
return parse_list_impl(val_type.__args__[0], val, path)
- if isinstance(val_type, Dict):
+ if issubclass(val_type, Dict):
if len(val_type.__args__) != 2:
raise InvalidConfigTypingException(path + ': Dict must be supplied exactly two types')
if val_type.__args__[0] != str: