From 27289d2049d70f8867e7d43b342fbacf3993527c Mon Sep 17 00:00:00 2001 From: Charlie Brown Date: Mon, 22 Apr 2024 02:26:17 +0800 Subject: [PATCH] Fixed the error of not correctly parsing single literal parameters. --- src/pdm/backend/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pdm/backend/utils.py b/src/pdm/backend/utils.py index 6b5d71c..66d72eb 100644 --- a/src/pdm/backend/utils.py +++ b/src/pdm/backend/utils.py @@ -215,7 +215,10 @@ def evaluate_module_attribute( obj: Any = functools.reduce(getattr, attrs, module) args_group = matched.group(3) if args_group: + # make tuple + args_group = args_group.strip()[:-1] + ",)" args = ast.literal_eval(args_group) + else: args = () return obj, args