diff options
author | vg <vgm+dev@devys.org> | 2023-03-22 23:29:48 +0100 |
---|---|---|
committer | vg <vgm+dev@devys.org> | 2023-03-22 23:29:48 +0100 |
commit | d5a867a1f15c9e2b6abbc746c3de45324f6e4cfe (patch) | |
tree | 5167e6d7474944c05e68ca20efa6f1db817fd391 /contacts_validation | |
parent | 0855de2b5aa3b26aa61edcdfe5fd2ba612094eb5 (diff) | |
download | devys-pim-master.tar.gz devys-pim-master.tar.bz2 devys-pim-master.zip |
Diffstat (limited to 'contacts_validation')
-rw-r--r-- | contacts_validation/contacts_validation/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contacts_validation/contacts_validation/__init__.py b/contacts_validation/contacts_validation/__init__.py index 0f00c18..c9c75be 100644 --- a/contacts_validation/contacts_validation/__init__.py +++ b/contacts_validation/contacts_validation/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2018 vg@devys.org +# Copyright 2023 vg@devys.org # SPDX-License-Identifier: MIT import collections @@ -7,6 +7,7 @@ import datetime import os import pprint import sys +import typing import jsonschema import yaml @@ -17,10 +18,10 @@ def convert_types(obj): return obj elif isinstance(obj, datetime.date): return obj.strftime('%F') - elif isinstance(obj, collections.Sequence): + elif isinstance(obj, typing.Sequence): for i, _ in enumerate(obj): obj[i] = convert_types(obj[i]) - elif isinstance(obj, collections.Mapping): + elif isinstance(obj, typing.Mapping): for k, v in obj.items(): obj[k] = convert_types(v) |