Skip to content

Commit

Permalink
Merge pull request #123 from moonstream-to/fix-tuple-array-parser
Browse files Browse the repository at this point in the history
Fixing the tuple array parsing. Now type=eval is included
  • Loading branch information
zomglings authored Apr 9, 2024
2 parents 05274f3 + 954b100 commit 9f9f772
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions moonworm/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
The entrypoint for this functionality is [`find_deployment_block`][moonworm.deployment.find_deployment_block].
"""

import logging
import os
import time
Expand Down
7 changes: 7 additions & 0 deletions moonworm/generators/brownie.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,13 @@ def generate_cli_generator(
value=cst.parse_expression("eval"),
),
)
elif param["type"] == "tuple[]":
call_args.append(
cst.Arg(
keyword=cst.Name(value="type"),
value=cst.parse_expression("eval"),
),
)
elif param["type"] == "Any":
# In general case, we just use a Python `eval` to parse the input from the command line.
# This is similar to the way we handle `tuple` arguments.
Expand Down
2 changes: 1 addition & 1 deletion moonworm/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MOONWORM_VERSION = "0.8.0"
MOONWORM_VERSION = "0.9.0"

0 comments on commit 9f9f772

Please sign in to comment.