pyln: Remove two more occurences of non-None default args

This commit is contained in:
Christian Decker 2022-03-18 13:01:17 +01:00 committed by Rusty Russell
parent ac322e1e5b
commit fdd7c6b192
2 changed files with 11 additions and 6 deletions

View File

@ -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).

View File

@ -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"