kopia lustrzana https://github.com/bugout-dev/moonworm
Merge branch 'main' into fix-exception-when-no-constructor
commit
a39d2b8486
|
@ -17,8 +17,6 @@ jobs:
|
|||
run: pip install -U pip
|
||||
- name: Install dev dependencies
|
||||
run: pip install -e .[dev]
|
||||
- name: Mypy type check
|
||||
run: mypy moonworm/
|
||||
- name: Isort imports check
|
||||
run: isort --check moonworm/
|
||||
- name: Black syntax check
|
||||
|
|
|
@ -95,11 +95,11 @@ def normalize_abi_name(name: str) -> str:
|
|||
|
||||
|
||||
def python_type(evm_type: str) -> List[str]:
|
||||
if evm_type.endswith("]"):
|
||||
if evm_type.endswith("]") and not evm_type.endswith("][]"):
|
||||
return ["List"]
|
||||
if evm_type.startswith(("uint", "int")):
|
||||
if evm_type.startswith(("uint", "int")) and "[" not in evm_type:
|
||||
return ["int"]
|
||||
if evm_type.startswith(("int", "int")):
|
||||
if evm_type.startswith(("int", "int")) and "[" not in evm_type:
|
||||
return ["int"]
|
||||
elif evm_type.startswith("bytes"):
|
||||
return ["bytes"]
|
||||
|
|
|
@ -831,6 +831,15 @@ def generate_cli_generator(
|
|||
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.
|
||||
call_args.append(
|
||||
cst.Arg(
|
||||
keyword=cst.Name(value="type"),
|
||||
value=cst.parse_expression("eval"),
|
||||
),
|
||||
)
|
||||
|
||||
add_argument_call = cst.Call(
|
||||
func=cst.Attribute(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Code generated by moonworm : https://github.com/bugout-dev/moonworm
|
||||
# Code generated by moonworm : https://github.com/moonstream-to/moonworm
|
||||
# Moonworm version : {moonworm_version}
|
||||
|
||||
import argparse
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Code generated by moonworm : https://github.com/bugout-dev/moonworm
|
||||
# Code generated by moonworm : https://github.com/moonstream-to/moonworm
|
||||
# Moonworm version : {moonworm_version}
|
||||
|
||||
import argparse
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Code generated by moonworm : https://github.com/bugout-dev/moonworm
|
||||
# Code generated by moonworm : https://github.com/moonstream-to/moonworm
|
||||
# Moonworm version : {moonworm_version}
|
||||
|
||||
import argparse
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Code generated by moonworm : https://github.com/bugout-dev/moonworm
|
||||
# Code generated by moonworm : https://github.com/moonstream-to/moonworm
|
||||
# Moonworm version : {moonworm_version}
|
||||
import json
|
||||
import os
|
||||
|
|
|
@ -1 +1 @@
|
|||
MOONWORM_VERSION = "0.6.3"
|
||||
MOONWORM_VERSION = "0.7.0"
|
4
setup.py
4
setup.py
|
@ -15,7 +15,7 @@ setup(
|
|||
"black",
|
||||
"inflection",
|
||||
"libcst",
|
||||
"pysha3<2.0.0,>=1.0.0",
|
||||
"pysha3<2.0.0,>=1.0.0; python_version < '3.6'",
|
||||
"tqdm",
|
||||
"typing-extensions",
|
||||
"web3>=5.27.0",
|
||||
|
@ -37,7 +37,7 @@ setup(
|
|||
"Topic :: Software Development :: Libraries",
|
||||
],
|
||||
python_requires=">=3.6",
|
||||
url="https://github.com/bugout-dev/moonworm/",
|
||||
url="https://github.com/moonstream-to/moonworm/",
|
||||
entry_points={"console_scripts": ["moonworm=moonworm.cli:main"]},
|
||||
include_package_data=True,
|
||||
)
|
||||
|
|
Ładowanie…
Reference in New Issue