From 0760aac9e5ace836bdd3c49cbffed8fc984b9d1d Mon Sep 17 00:00:00 2001 From: Paul Gesel Date: Fri, 2 Aug 2024 10:18:53 -0600 Subject: [PATCH] add comment to explain TypeError change Signed-off-by: Paul Gesel --- .../generate_parameter_library_py/parse_yaml.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generate_parameter_library_py/generate_parameter_library_py/parse_yaml.py b/generate_parameter_library_py/generate_parameter_library_py/parse_yaml.py index a762718..7bb1fec 100644 --- a/generate_parameter_library_py/generate_parameter_library_py/parse_yaml.py +++ b/generate_parameter_library_py/generate_parameter_library_py/parse_yaml.py @@ -32,9 +32,11 @@ from jinja2 import Template, Environment from typeguard import typechecked +# try to import TypeCheckError from typeguard. This was breaking and replaced TypeError in 3.0.0 try: from typeguard import TypeCheckError -except: +except ImportError as e: + # otherwise, use the old TypeError TypeCheckError = TypeError from typing import Any, List, Union