aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Gräf <romangraef@loves.dicksinhisan.us>2018-09-11 10:51:41 +0000
committerGitHub <noreply@github.com>2018-09-11 10:51:41 +0000
commit1a8ad5300a49198761026139a6fe66be505afe98 (patch)
tree94275ce27665f1ca0592549d6766e4dd9cb14e74
parent3abeaaeee510cee943d589b5be8c15b8a145051c (diff)
downloadconfiglib-1.0a.tar.gz
configlib-1.0a.tar.bz2
configlib-1.0a.zip
Fixed Dict[] and List[]HEAD1.0amaster
-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: