Skip to content

Commit

Permalink
Fixed the error of not correctly parsing single literal parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
cntvc committed Apr 21, 2024
1 parent 68da455 commit 27289d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pdm/backend/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 27289d2

Please sign in to comment.