From a51ede4c8ff65b84b2d8a62b509aa5a3a4bd8b1f Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 3 May 2024 16:44:35 +0100 Subject: [PATCH] Fix evaluating values for Python 3.9 `literal_eval` only strips leading spaces in 3.10+ --- src/epydeck/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/epydeck/__init__.py b/src/epydeck/__init__.py index 7116f06..5d2c125 100644 --- a/src/epydeck/__init__.py +++ b/src/epydeck/__init__.py @@ -56,7 +56,7 @@ def _parse_block(line: str, fh: TextIOBase) -> dict: key = key.strip() try: - value = literal_eval(value) + value = literal_eval(value.strip()) except (ValueError, SyntaxError): value = value.strip()