diff options
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) |