diff --git a/brownie/_cli/networks.py b/brownie/_cli/networks.py index 75666272e..1bff22099 100644 --- a/brownie/_cli/networks.py +++ b/brownie/_cli/networks.py @@ -121,12 +121,15 @@ def _add(env, id_, *args): with _get_data_folder().joinpath("network-config.yaml").open() as fp: networks = yaml.safe_load(fp) if env.lower() == "development": - new = { - "name": args.pop("name"), - "id": id_, - "cmd": args.pop("cmd"), - "host": args.pop("host"), - } + try: + new = { + "name": args.pop("name"), + "id": id_, + "cmd": args.pop("cmd"), + "host": args.pop("host"), + } + except KeyError as exc: + raise ValueError(f"Missing field: {exc.args[0]}") if "timeout" in args: new["timeout"] = args.pop("timeout") new["cmd_settings"] = args diff --git a/requirements-dev.txt b/requirements-dev.txt index 9c50ea335..a16655690 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,20 +1,18 @@ # -# This file is autogenerated by pip-compile with python 3.9 +# This file is autogenerated by pip-compile with python 3.10 # To update, run: # # pip-compile requirements-dev.in # alabaster==0.7.12 # via sphinx -attrs==21.2.0 +attrs==21.4.0 # via # -c requirements.txt # pytest -babel==2.9.1 +babel==2.10.1 # via sphinx -backports.entry-points-selectable==1.1.0 - # via virtualenv -bleach==4.1.0 +bleach==5.0.0 # via readme-renderer bump2version==1.0.1 # via bumpversion @@ -26,30 +24,30 @@ certifi==2021.10.8 # requests cffi==1.15.0 # via cryptography -charset-normalizer==2.0.9 +charset-normalizer==2.0.12 # via # -c requirements.txt # requests -click==8.0.3 +click==8.1.3 # via # -c requirements.txt # pip-tools -colorama==0.4.4 - # via twine -coverage[toml]==6.0.2 +commonmark==0.9.1 + # via rich +coverage[toml]==6.3.3 # via # -r requirements-dev.in # pytest-cov -cryptography==35.0.0 +cryptography==37.0.2 # via secretstorage -distlib==0.3.3 +distlib==0.3.4 # via virtualenv docutils==0.17.1 # via # readme-renderer # sphinx # sphinx-rtd-theme -filelock==3.3.1 +filelock==3.7.0 # via # tox # virtualenv @@ -59,9 +57,9 @@ idna==3.3 # via # -c requirements.txt # requests -imagesize==1.2.0 +imagesize==1.3.0 # via sphinx -importlib-metadata==4.8.2 +importlib-metadata==4.11.3 # via # keyring # twine @@ -69,17 +67,17 @@ iniconfig==1.1.1 # via # -c requirements.txt # pytest -isort==5.9.3 +isort==5.10.1 # via -r requirements-dev.in -jeepney==0.7.1 +jeepney==0.8.0 # via # keyring # secretstorage -jinja2==3.0.2 +jinja2==3.1.2 # via sphinx -keyring==23.2.1 +keyring==23.5.0 # via twine -markupsafe==2.0.1 +markupsafe==2.1.1 # via jinja2 mccabe==0.6.1 # via flake8 @@ -92,17 +90,16 @@ mypy-extensions==0.4.3 packaging==21.3 # via # -c requirements.txt - # bleach # pytest # sphinx # tox pep517==0.12.0 # via pip-tools -pip-tools==6.4.0 +pip-tools==6.6.1 # via -r requirements-dev.in -pkginfo==1.7.1 +pkginfo==1.8.2 # via twine -platformdirs==2.4.0 +platformdirs==2.5.2 # via # -c requirements.txt # virtualenv @@ -118,16 +115,17 @@ py==1.11.0 # tox pycodestyle==2.7.0 # via flake8 -pycparser==2.20 +pycparser==2.21 # via cffi pyflakes==2.3.1 # via flake8 -pygments==2.10.0 +pygments==2.12.0 # via # -c requirements.txt # readme-renderer + # rich # sphinx -pyparsing==3.0.6 +pyparsing==3.0.9 # via # -c requirements.txt # packaging @@ -138,13 +136,13 @@ pytest==6.2.5 # pytest-mock pytest-cov==3.0.0 # via -r requirements-dev.in -pytest-mock==3.6.1 +pytest-mock==3.7.0 # via -r requirements-dev.in -pytz==2021.3 +pytz==2022.1 # via babel -readme-renderer==30.0 +readme-renderer==35.0 # via twine -requests==2.26.0 +requests==2.27.1 # via # -c requirements.txt # requests-toolbelt @@ -152,9 +150,11 @@ requests==2.26.0 # twine requests-toolbelt==0.9.1 # via twine -rfc3986==1.5.0 +rfc3986==2.0.0 + # via twine +rich==12.4.1 # via twine -secretstorage==3.3.1 +secretstorage==3.3.2 # via keyring six==1.16.0 # via @@ -162,9 +162,9 @@ six==1.16.0 # bleach # tox # virtualenv -snowballstemmer==2.1.0 +snowballstemmer==2.2.0 # via sphinx -sphinx==4.2.0 +sphinx==4.5.0 # via # -r requirements-dev.in # sphinx-rtd-theme @@ -187,38 +187,34 @@ toml==0.10.2 # -c requirements.txt # pytest # tox -tomli==1.2.2 +tomli==2.0.1 # via # -c requirements.txt # coverage # pep517 -tox==3.24.4 +tox==3.25.0 # via -r requirements-dev.in -tqdm==4.62.3 - # via - # -c requirements.txt - # twine -twine==3.4.2 +twine==4.0.0 # via -r requirements-dev.in typed-ast==1.4.3 # via mypy -typing-extensions==3.10.0.2 - # via - # -c requirements.txt - # mypy -urllib3==1.26.7 +typing-extensions==4.2.0 + # via mypy +urllib3==1.26.9 # via # -c requirements.txt # requests -virtualenv==20.9.0 + # twine +virtualenv==20.14.1 # via tox webencodings==0.5.1 # via bleach -wheel==0.37.0 +wheel==0.37.1 # via + # -c requirements.txt # -r requirements-dev.in # pip-tools -zipp==3.6.0 +zipp==3.8.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements-windows.txt b/requirements-windows.txt index c0a3050fb..74f0214b4 100644 --- a/requirements-windows.txt +++ b/requirements-windows.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.10 # To update, run: # # pip-compile requirements-windows.in @@ -35,18 +35,18 @@ bitarray==1.2.2 # via # -r requirements.txt # eth-account -black==22.1.0 +black==22.3.0 # via -r requirements.txt certifi==2021.10.8 # via # -r requirements.txt # requests -charset-normalizer==2.0.11 +charset-normalizer==2.0.12 # via # -r requirements.txt # aiohttp # requests -click==8.0.3 +click==8.1.3 # via # -r requirements.txt # black @@ -196,7 +196,7 @@ pathspec==0.9.0 # via # -r requirements.txt # black -platformdirs==2.4.1 +platformdirs==2.5.2 # via # -r requirements.txt # black @@ -204,23 +204,23 @@ pluggy==1.0.0 # via # -r requirements.txt # pytest -prompt-toolkit==3.0.26 +prompt-toolkit==3.0.29 # via -r requirements.txt -protobuf==3.19.4 +protobuf==3.20.1 # via # -r requirements.txt # web3 psutil==5.9.0 # via -r requirements.txt -py-solc-ast==1.2.9 - # via -r requirements.txt -py-solc-x==1.1.1 - # via -r requirements.txt py==1.11.0 # via # -r requirements.txt # pytest # pytest-forked +py-solc-ast==1.2.9 + # via -r requirements.txt +py-solc-x==1.1.1 + # via -r requirements.txt pycryptodome==3.14.1 # via # -r requirements.txt @@ -228,17 +228,17 @@ pycryptodome==3.14.1 # eth-hash # eth-keyfile # vyper -pygments-lexer-solidity==0.7.0 - # via -r requirements.txt -pygments==2.11.2 +pygments==2.12.0 # via # -r requirements.txt # pygments-lexer-solidity +pygments-lexer-solidity==0.7.0 + # via -r requirements.txt pyjwt==1.7.1 # via # -r requirements.txt # pythx -pyparsing==3.0.7 +pyparsing==3.0.9 # via # -r requirements.txt # packaging @@ -246,17 +246,17 @@ pyrsistent==0.18.1 # via # -r requirements.txt # jsonschema -pytest-forked==1.4.0 +pytest==6.2.5 # via # -r requirements.txt + # pytest-forked # pytest-xdist -pytest-xdist==1.34.0 - # via -r requirements.txt -pytest==6.2.5 +pytest-forked==1.4.0 # via # -r requirements.txt - # pytest-forked # pytest-xdist +pytest-xdist==1.34.0 + # via -r requirements.txt python-dateutil==2.8.1 # via # -r requirements.txt @@ -304,7 +304,7 @@ toml==0.10.2 # via # -r requirements.txt # pytest -tomli==2.0.0 +tomli==2.0.1 # via # -r requirements.txt # black @@ -312,13 +312,9 @@ toolz==0.11.2 # via # -r requirements.txt # cytoolz -tqdm==4.62.3 +tqdm==4.64.0 # via -r requirements.txt -typing-extensions==4.0.1 - # via - # -r requirements.txt - # black -urllib3==1.26.8 +urllib3==1.26.9 # via # -r requirements.txt # requests @@ -328,19 +324,23 @@ varint==1.0.2 # multiaddr vvm==0.1.0 # via -r requirements.txt -vyper==0.3.1 +vyper==0.3.3 # via -r requirements.txt wcwidth==0.2.5 # via # -r requirements.txt # prompt-toolkit -web3==5.27.0 +web3==5.29.0 # via -r requirements.txt websockets==9.1 # via # -r requirements.txt # web3 -wrapt==1.13.3 +wheel==0.37.1 + # via + # -r requirements.txt + # vyper +wrapt==1.14.1 # via -r requirements.txt yarl==1.7.2 # via diff --git a/requirements.txt b/requirements.txt index a2285bd34..cb73dd9c1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.10 # To update, run: # # pip-compile requirements.in @@ -22,15 +22,15 @@ base58==2.1.1 # via multiaddr bitarray==1.2.2 # via eth-account -black==22.1.0 +black==22.3.0 # via -r requirements.in certifi==2021.10.8 # via requests -charset-normalizer==2.0.11 +charset-normalizer==2.0.12 # via # aiohttp # requests -click==8.0.3 +click==8.1.3 # via black cytoolz==0.11.2 # via @@ -142,52 +142,52 @@ parsimonious==0.8.1 # via eth-abi pathspec==0.9.0 # via black -platformdirs==2.4.1 +platformdirs==2.5.2 # via black pluggy==1.0.0 # via pytest -prompt-toolkit==3.0.26 +prompt-toolkit==3.0.29 # via -r requirements.in -protobuf==3.19.4 +protobuf==3.20.1 # via web3 psutil==5.9.0 # via -r requirements.in -py-solc-ast==1.2.9 - # via -r requirements.in -py-solc-x==1.1.1 - # via -r requirements.in py==1.11.0 # via # -r requirements.in # pytest # pytest-forked +py-solc-ast==1.2.9 + # via -r requirements.in +py-solc-x==1.1.1 + # via -r requirements.in pycryptodome==3.14.1 # via # eip712 # eth-hash # eth-keyfile # vyper -pygments-lexer-solidity==0.7.0 - # via -r requirements.in -pygments==2.11.2 +pygments==2.12.0 # via # -r requirements.in # pygments-lexer-solidity +pygments-lexer-solidity==0.7.0 + # via -r requirements.in pyjwt==1.7.1 # via pythx -pyparsing==3.0.7 +pyparsing==3.0.9 # via packaging pyrsistent==0.18.1 # via jsonschema -pytest-forked==1.4.0 - # via pytest-xdist -pytest-xdist==1.34.0 - # via -r requirements.in pytest==6.2.5 # via # -r requirements.in # pytest-forked # pytest-xdist +pytest-forked==1.4.0 + # via pytest-xdist +pytest-xdist==1.34.0 + # via -r requirements.in python-dateutil==2.8.1 # via # mythx-models @@ -229,29 +229,29 @@ sortedcontainers==2.4.0 # via hypothesis toml==0.10.2 # via pytest -tomli==2.0.0 +tomli==2.0.1 # via black toolz==0.11.2 # via cytoolz -tqdm==4.62.3 +tqdm==4.64.0 # via -r requirements.in -typing-extensions==4.0.1 - # via black -urllib3==1.26.8 +urllib3==1.26.9 # via requests varint==1.0.2 # via multiaddr vvm==0.1.0 # via -r requirements.in -vyper==0.3.1 +vyper==0.3.3 # via -r requirements.in wcwidth==0.2.5 # via prompt-toolkit -web3==5.27.0 +web3==5.29.0 # via -r requirements.in websockets==9.1 # via web3 -wrapt==1.13.3 +wheel==0.37.1 + # via vyper +wrapt==1.14.1 # via -r requirements.in yarl==1.7.2 # via aiohttp diff --git a/tests/cli/test_cli_networks.py b/tests/cli/test_cli_networks.py index 47dbed2cd..1863c0eb2 100644 --- a/tests/cli/test_cli_networks.py +++ b/tests/cli/test_cli_networks.py @@ -94,7 +94,7 @@ def test_add_dev_missing_field(): def test_add_dev_unknown_field(): with pytest.raises(ValueError): - cli_networks._add("development", "tester", "cmd=foo", "host=127.0.0.1" "chainid=411") + cli_networks._add("development", "tester", "cmd=foo", "host=127.0.0.1", "chainid=411") def test_modify():