diff options
author | Roman Gräf <romangraef@loves.dicksinhisan.us> | 2018-09-11 10:51:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-11 10:51:41 +0000 |
commit | 1a8ad5300a49198761026139a6fe66be505afe98 (patch) | |
tree | 94275ce27665f1ca0592549d6766e4dd9cb14e74 /configlib/model_impl.py | |
parent | 3abeaaeee510cee943d589b5be8c15b8a145051c (diff) | |
download | configlib-1a8ad5300a49198761026139a6fe66be505afe98.tar.gz configlib-1a8ad5300a49198761026139a6fe66be505afe98.tar.bz2 configlib-1a8ad5300a49198761026139a6fe66be505afe98.zip |
Diffstat (limited to 'configlib/model_impl.py')
-rw-r--r-- | configlib/model_impl.py | 4 |
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: |