Skip to content
Snippets Groups Projects
Commit 07d9d690 authored by Moul's avatar Moul
Browse files

[dep] #338: Update black to v20.8b1

parent e6a4ff57
No related branches found
No related tags found
2 merge requests!146Merge dev into master branch to complete v0.8.0 development cycle,!140Membership, choose_identity, pendulum, asynctest dependencies
Pipeline #9692 passed
...@@ -106,18 +106,24 @@ marker = "python_version >= \"3.6\" and python_version < \"4.0\"" ...@@ -106,18 +106,24 @@ marker = "python_version >= \"3.6\" and python_version < \"4.0\""
name = "black" name = "black"
optional = false optional = false
python-versions = ">=3.6" python-versions = ">=3.6"
version = "19.10b0" version = "20.8b1"
[package.dependencies] [package.dependencies]
appdirs = "*" appdirs = "*"
attrs = ">=18.1.0" click = ">=7.1.2"
click = ">=6.5" mypy-extensions = ">=0.4.3"
pathspec = ">=0.6,<1" pathspec = ">=0.6,<1"
regex = "*" regex = ">=2020.1.8"
toml = ">=0.9.4" toml = ">=0.10.1"
typed-ast = ">=1.4.0" typed-ast = ">=1.4.0"
typing-extensions = ">=3.7.4"
[package.dependencies.dataclasses]
python = "<3.7"
version = ">=0.6"
[package.extras] [package.extras]
colorama = ["colorama (>=0.4.3)"]
d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] d = ["aiohttp (>=3.3.2)", "aiohttp-cors"]
[[package]] [[package]]
...@@ -186,6 +192,15 @@ optional = false ...@@ -186,6 +192,15 @@ optional = false
python-versions = "*" python-versions = "*"
version = "1.0.1" version = "1.0.1"
[[package]]
category = "dev"
description = "A backport of the dataclasses module for Python 3.6"
marker = "python_version >= \"3.6\" and python_version < \"3.7\""
name = "dataclasses"
optional = false
python-versions = ">=3.6, <3.7"
version = "0.7"
[[package]] [[package]]
category = "dev" category = "dev"
description = "Distribution utilities" description = "Distribution utilities"
...@@ -346,6 +361,15 @@ optional = false ...@@ -346,6 +361,15 @@ optional = false
python-versions = ">=3.5" python-versions = ">=3.5"
version = "4.7.6" version = "4.7.6"
[[package]]
category = "dev"
description = "Experimental type system extensions for programs checked with the mypy typechecker."
marker = "python_version >= \"3.6\" and python_version < \"4.0\""
name = "mypy-extensions"
optional = false
python-versions = "*"
version = "0.4.3"
[[package]] [[package]]
category = "dev" category = "dev"
description = "Node.js virtual environment builder" description = "Node.js virtual environment builder"
...@@ -742,7 +766,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] ...@@ -742,7 +766,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"]
testing = ["pathlib2", "unittest2", "jaraco.itertools", "func-timeout"] testing = ["pathlib2", "unittest2", "jaraco.itertools", "func-timeout"]
[metadata] [metadata]
content-hash = "fe9defd881ff1ab7da675e5679bf01b12f9c8fe354feea820bd13fe0e6f20958" content-hash = "5fb062da355b9170f5dc0772c2ae50d4231081e04849305a97ac4d003b05bfde"
python-versions = "^3.5.3" python-versions = "^3.5.3"
[metadata.files] [metadata.files]
...@@ -794,8 +818,8 @@ base58 = [ ...@@ -794,8 +818,8 @@ base58 = [
{file = "base58-1.0.3.tar.gz", hash = "sha256:9a793c599979c497800eb414c852b80866f28daaed5494703fc129592cc83e60"}, {file = "base58-1.0.3.tar.gz", hash = "sha256:9a793c599979c497800eb414c852b80866f28daaed5494703fc129592cc83e60"},
] ]
black = [ black = [
{file = "black-19.10b0-py36-none-any.whl", hash = "sha256:1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b"}, {file = "black-20.8b1-py3-none-any.whl", hash = "sha256:70b62ef1527c950db59062cda342ea224d772abdf6adc58b86a45421bab20a6b"},
{file = "black-19.10b0.tar.gz", hash = "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539"}, {file = "black-20.8b1.tar.gz", hash = "sha256:1c02557aa099101b9d21496f8a914e9ed2222ef70336404eeeac8edba836fbea"},
] ]
cffi = [ cffi = [
{file = "cffi-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:66dd45eb9530e3dde8f7c009f84568bc7cac489b93d04ac86e3111fb46e470c2"}, {file = "cffi-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:66dd45eb9530e3dde8f7c009f84568bc7cac489b93d04ac86e3111fb46e470c2"},
...@@ -883,6 +907,10 @@ coverage-badge = [ ...@@ -883,6 +907,10 @@ coverage-badge = [
{file = "coverage-badge-1.0.1.tar.gz", hash = "sha256:142fd121f3bd14956aff3c45bff6f8bc37bd74c6350626a950ebb6accb24276e"}, {file = "coverage-badge-1.0.1.tar.gz", hash = "sha256:142fd121f3bd14956aff3c45bff6f8bc37bd74c6350626a950ebb6accb24276e"},
{file = "coverage_badge-1.0.1-py2.py3-none-any.whl", hash = "sha256:3796de21b4e190d38beb8806956946fbdb02fe3a2a7452b460a9cff958009833"}, {file = "coverage_badge-1.0.1-py2.py3-none-any.whl", hash = "sha256:3796de21b4e190d38beb8806956946fbdb02fe3a2a7452b460a9cff958009833"},
] ]
dataclasses = [
{file = "dataclasses-0.7-py3-none-any.whl", hash = "sha256:3459118f7ede7c8bea0fe795bff7c6c2ce287d01dd226202f7c9ebc0610a7836"},
{file = "dataclasses-0.7.tar.gz", hash = "sha256:494a6dcae3b8bcf80848eea2ef64c0cc5cd307ffc263e17cdf42f3e5420808e6"},
]
distlib = [ distlib = [
{file = "distlib-0.3.1-py2.py3-none-any.whl", hash = "sha256:8c09de2c67b3e7deef7184574fc060ab8a793e7adbb183d942c389c8b13c52fb"}, {file = "distlib-0.3.1-py2.py3-none-any.whl", hash = "sha256:8c09de2c67b3e7deef7184574fc060ab8a793e7adbb183d942c389c8b13c52fb"},
{file = "distlib-0.3.1.zip", hash = "sha256:edf6116872c863e1aa9d5bb7cb5e05a022c519a4594dc703843343a9ddd9bff1"}, {file = "distlib-0.3.1.zip", hash = "sha256:edf6116872c863e1aa9d5bb7cb5e05a022c519a4594dc703843343a9ddd9bff1"},
...@@ -952,6 +980,10 @@ multidict = [ ...@@ -952,6 +980,10 @@ multidict = [
{file = "multidict-4.7.6-cp38-cp38-win_amd64.whl", hash = "sha256:7388d2ef3c55a8ba80da62ecfafa06a1c097c18032a501ffd4cabbc52d7f2b19"}, {file = "multidict-4.7.6-cp38-cp38-win_amd64.whl", hash = "sha256:7388d2ef3c55a8ba80da62ecfafa06a1c097c18032a501ffd4cabbc52d7f2b19"},
{file = "multidict-4.7.6.tar.gz", hash = "sha256:fbb77a75e529021e7c4a8d4e823d88ef4d23674a202be4f5addffc72cbb91430"}, {file = "multidict-4.7.6.tar.gz", hash = "sha256:fbb77a75e529021e7c4a8d4e823d88ef4d23674a202be4f5addffc72cbb91430"},
] ]
mypy-extensions = [
{file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
{file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
]
nodeenv = [ nodeenv = [
{file = "nodeenv-1.4.0-py2.py3-none-any.whl", hash = "sha256:4b0b77afa3ba9b54f4b6396e60b0c83f59eaeb2d63dc3cc7a70f7f4af96c82bc"}, {file = "nodeenv-1.4.0-py2.py3-none-any.whl", hash = "sha256:4b0b77afa3ba9b54f4b6396e60b0c83f59eaeb2d63dc3cc7a70f7f4af96c82bc"},
] ]
......
...@@ -22,7 +22,7 @@ pendulum = "^2.1.2" ...@@ -22,7 +22,7 @@ pendulum = "^2.1.2"
PyNaCl = "^1.3" PyNaCl = "^1.3"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
black = {version = "^19.10b0", python = "^3.6"} black = {version = "^20.8b1", python = "^3.6"}
pre-commit = "^1.18" pre-commit = "^1.18"
pytest = "^6.0" pytest = "^6.0"
pytest-cov = "^2.7" pytest-cov = "^2.7"
......
...@@ -140,7 +140,12 @@ async def send_transaction( ...@@ -140,7 +140,12 @@ async def send_transaction(
== "yes" == "yes"
): ):
await handle_intermediaries_transactions( await handle_intermediaries_transactions(
key, issuer_pubkey, tx_amounts, recipients, comment, outputbackchange, key,
issuer_pubkey,
tx_amounts,
recipients,
comment,
outputbackchange,
) )
else: else:
client = ClientInstance().client client = ClientInstance().client
...@@ -232,10 +237,18 @@ async def transaction_confirmation( ...@@ -232,10 +237,18 @@ async def transaction_confirmation(
tx = list() tx = list()
# display account situation # display account situation
display_amount( display_amount(
tx, "pubkey's balance before tx", pubkey_amount, ud_value, currency_symbol, tx,
"pubkey's balance before tx",
pubkey_amount,
ud_value,
currency_symbol,
) )
display_amount( display_amount(
tx, "total transaction amount", total_tx_amount, ud_value, currency_symbol, tx,
"total transaction amount",
total_tx_amount,
ud_value,
currency_symbol,
) )
display_amount( display_amount(
tx, tx,
...@@ -280,7 +293,12 @@ async def get_list_input_for_transaction(pubkey, TXamount): ...@@ -280,7 +293,12 @@ async def get_list_input_for_transaction(pubkey, TXamount):
async def handle_intermediaries_transactions( async def handle_intermediaries_transactions(
key, issuers, tx_amounts, outputAddresses, Comment="", OutputbackChange=None, key,
issuers,
tx_amounts,
outputAddresses,
Comment="",
OutputbackChange=None,
): ):
client = ClientInstance().client client = ClientInstance().client
while True: while True:
......
...@@ -41,7 +41,15 @@ async def test_transaction_amount(monkeypatch): ...@@ -41,7 +41,15 @@ async def test_transaction_amount(monkeypatch):
([141.89, 141.99], None, ["A", "B"], [14189, 14199]), ([141.89, 141.99], None, ["A", "B"], [14189, 14199]),
# tests for --amount_UD # tests for --amount_UD
(None, [1.1], ["A"], [round(1.1 * udvalue)]), (None, [1.1], ["A"], [round(1.1 * udvalue)]),
(None, [1.9], ["A", "B",], [round(1.9 * udvalue), round(1.9 * udvalue)]), (
None,
[1.9],
[
"A",
"B",
],
[round(1.9 * udvalue), round(1.9 * udvalue)],
),
(None, [1.0001], ["A"], [round(1.0001 * udvalue)]), (None, [1.0001], ["A"], [round(1.0001 * udvalue)]),
(None, [9.9999], ["A"], [round(9.9999 * udvalue)]), (None, [9.9999], ["A"], [round(9.9999 * udvalue)]),
(None, [1.9, 2.3], ["A", "B"], [round(1.9 * udvalue), round(2.3 * udvalue)]), (None, [1.9, 2.3], ["A", "B"], [round(1.9 * udvalue), round(2.3 * udvalue)]),
......
...@@ -218,7 +218,8 @@ def test_compute_amounts_errors(capsys): ...@@ -218,7 +218,8 @@ def test_compute_amounts_errors(capsys):
with pytest.raises(SystemExit) as pytest_exit: with pytest.raises(SystemExit) as pytest_exit:
# read output to check error. # read output to check error.
compute_amounts( compute_amounts(
trial[0], trial[1], trial[0],
trial[1],
) )
expected_error = "Error: amount {0} is too low.".format(trial[0][0]) expected_error = "Error: amount {0} is too low.".format(trial[0][0])
assert capsys.readouterr() == expected_error assert capsys.readouterr() == expected_error
...@@ -241,7 +242,8 @@ def test_compute_amounts(): ...@@ -241,7 +242,8 @@ def test_compute_amounts():
assert compute_amounts([1.001], ud_value) == [314] assert compute_amounts([1.001], ud_value) == [314]
assert compute_amounts([1.009], ud_value) == [317] assert compute_amounts([1.009], ud_value) == [317]
# This case will not happen in real use, but this particular function will allow it. # This case will not happen in real use, but this particular function will allow it.
assert compute_amounts([0.0099], 100,) == [1]
assert compute_amounts([0.0099], 100) == [1]
# transaction_amount() # transaction_amount()
...@@ -289,7 +291,9 @@ def test_compute_amounts(): ...@@ -289,7 +291,9 @@ def test_compute_amounts():
( (
None, None,
[0.00002], [0.00002],
["DBM6F5ChMJzpmkUdL5zD9UXKExmZGfQ1AgPDQy4MxSBw",], [
"DBM6F5ChMJzpmkUdL5zD9UXKExmZGfQ1AgPDQy4MxSBw",
],
"Error: amount 0.00002 is too low.", "Error: amount 0.00002 is too low.",
), ),
( (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment