Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
contract_wrappers.py: pull in generated Exchange
Browse files Browse the repository at this point in the history
  • Loading branch information
feuGeneA committed Jul 11, 2019
1 parent 4661786 commit 9dbabb2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
5 changes: 1 addition & 4 deletions python-packages/contract_wrappers/.pylintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[MESSAGES CONTROL]
disable=C0330,line-too-long,fixme,too-few-public-methods,too-many-ancestors
disable=C0330,line-too-long,fixme,too-few-public-methods,too-many-ancestors,duplicate-code
# C0330 is "bad hanging indent". we use indents per `black`.

[SIMILARITIES]
min-similarity-lines=12
22 changes: 18 additions & 4 deletions python-packages/contract_wrappers/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,27 @@ def run(self):
),
path.join(pkgdir, "src", "zero_ex", "contract_wrappers"),
)
copy(
path.join(
pkgdir,
"..",
"..",
"packages",
"python-contract-wrappers",
"generated",
"exchange.py",
),
path.join(pkgdir, "src", "zero_ex", "contract_wrappers"),
)
if find_spec("black") is None:
subprocess.check_call("pip install black".split()) # nosec
subprocess.check_call( # nosec
(
BLACK_COMMAND + " src/zero_ex/contract_wrappers/erc20_token.py"
).split()
black_command = (
BLACK_COMMAND
+ " src/zero_ex/contract_wrappers/erc20_token.py"
+ " src/zero_ex/contract_wrappers/exchange.py"
)
print(f"Running command `{black_command}`...")
subprocess.check_call(black_command.split()) # nosec


class TestCommandExtension(TestCommand):
Expand Down

0 comments on commit 9dbabb2

Please sign in to comment.