From fdd7c6b192e118f131e9c9ffdeb661b19b6b945b Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 18 Mar 2022 13:01:17 +0100 Subject: [PATCH] pyln: Remove two more occurences of non-None default args --- contrib/pyln-client/pyln/client/lightning.py | 15 ++++++++++----- contrib/pyln-testing/pyproject.toml | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/contrib/pyln-client/pyln/client/lightning.py b/contrib/pyln-client/pyln/client/lightning.py index 1c17b1c5a..e6d1dc584 100644 --- a/contrib/pyln-client/pyln/client/lightning.py +++ b/contrib/pyln-client/pyln/client/lightning.py @@ -616,7 +616,7 @@ class LightningRpc(UnixDomainSocketRpc): def dev_pay(self, bolt11, msatoshi=None, label=None, riskfactor=None, maxfeepercent=None, retry_for=None, - maxdelay=None, exemptfee=None, use_shadow=True, exclude=[]): + maxdelay=None, exemptfee=None, use_shadow=True, exclude=None): """ A developer version of `pay`, with the possibility to deactivate shadow routing (used for testing). @@ -701,7 +701,9 @@ class LightningRpc(UnixDomainSocketRpc): } return self.call("feerates", payload) - def fundchannel(self, node_id, amount, feerate=None, announce=True, minconf=None, utxos=None, push_msat=None, close_to=None, request_amt=None, compact_lease=None): + def fundchannel(self, node_id, amount, feerate=None, announce=True, + minconf=None, utxos=None, push_msat=None, close_to=None, + request_amt=None, compact_lease=None): """ Fund channel with {id} using {amount} satoshis with feerate of {feerate} (uses default feerate if unset). @@ -729,7 +731,8 @@ class LightningRpc(UnixDomainSocketRpc): } return self.call("fundchannel", payload) - def fundchannel_start(self, node_id, amount, feerate=None, announce=True, close_to=None): + def fundchannel_start(self, node_id, amount, feerate=None, announce=True, + close_to=None): """ Start channel funding with {id} for {amount} satoshis with feerate of {feerate} (uses default feerate if unset). @@ -793,7 +796,8 @@ class LightningRpc(UnixDomainSocketRpc): res = self.call("listpeers", payload) return res.get("peers") and res["peers"][0] or None - def getroute(self, node_id, msatoshi, riskfactor, cltv=9, fromid=None, fuzzpercent=None, exclude=[], maxhops=20): + def getroute(self, node_id, msatoshi, riskfactor, cltv=9, fromid=None, + fuzzpercent=None, exclude=None, maxhops=None): """ Show route to {id} for {msatoshi}, using {riskfactor} and optional {cltv} (default 9). If specified search from {fromid} otherwise use @@ -823,7 +827,8 @@ class LightningRpc(UnixDomainSocketRpc): } return self.call("help", payload) - def invoice(self, msatoshi, label, description, expiry=None, fallbacks=None, preimage=None, exposeprivatechannels=None, cltv=None): + def invoice(self, msatoshi, label, description, expiry=None, fallbacks=None, + preimage=None, exposeprivatechannels=None, cltv=None): """ Create an invoice for {msatoshi} with {label} and {description} with optional {expiry} seconds (default 1 week). diff --git a/contrib/pyln-testing/pyproject.toml b/contrib/pyln-testing/pyproject.toml index ab8a59b35..c9a319455 100644 --- a/contrib/pyln-testing/pyproject.toml +++ b/contrib/pyln-testing/pyproject.toml @@ -16,7 +16,7 @@ ephemeral-port-reserve = "^1.1.4" psycopg2-binary = "^2.9.3" python-bitcoinlib = "^0.11.0" jsonschema = "^4.4.0" -pyln-client = { path = "../pyln-client" } +pyln-client = "^0.10.2" Flask = "^2.0.3" cheroot = "^8.6.0" psutil = "^5.9.0"