Skip to content

Commit

Permalink
pep508: Remove stripStr call from unparen
Browse files Browse the repository at this point in the history
  • Loading branch information
adisbladis committed Mar 2, 2024
1 parent ea6be51 commit 91c7ee0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/pep508.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ let
);

# Remove groupings ( ) from expression
unparen = expr':
unparen =
let
expr = stripStr expr';
m = match "\\((.+)\\)" expr;
matchParen = match "[\t ]*\\((.+)\\)[\t ]*";
in
if m != null then elemAt m 0 else expr;
expr:
let
m = matchParen expr;
in
if m != null then head m else expr;

isMarkerVariable =
let
Expand Down

0 comments on commit 91c7ee0

Please sign in to comment.