Skip to content

Commit 2e7513d

Browse files
committed
chore(fmt): Fix formatting of new python files.
1 parent e1ed03f commit 2e7513d

File tree

2 files changed

+166
-134
lines changed

2 files changed

+166
-134
lines changed

tests/plugins/lsps2_policy.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
""" A simple implementation of a LSPS2 compatible policy plugin. It is the job
2+
"""A simple implementation of a LSPS2 compatible policy plugin. It is the job
33
of this plugin to deliver a fee options menu to the LSPS2 service plugin.
44
"""
55

@@ -12,45 +12,45 @@
1212

1313
@plugin.method("dev-lsps2-getpolicy")
1414
def lsps2_getpolicy(request):
15-
""" Returns an opening fee menu for the LSPS2 plugin.
16-
"""
15+
"""Returns an opening fee menu for the LSPS2 plugin."""
1716
now = datetime.now(timezone.utc)
1817

1918
# Is ISO 8601 format "YYYY-MM-DDThh:mm:ss.uuuZ"
20-
valid_until = (now + timedelta(hours=1)).isoformat().replace('+00:00', 'Z')
21-
22-
return { "policy_opening_fee_params_menu": [
23-
{
24-
"min_fee_msat": "1000",
25-
"proportional": 1000,
26-
"valid_until": valid_until,
27-
"min_lifetime": 2000,
28-
"max_client_to_self_delay": 2016,
29-
"min_payment_size_msat": "1000",
30-
"max_payment_size_msat": "100000000",
31-
},
32-
{
33-
"min_fee_msat": "1092000",
34-
"proportional": 2400,
35-
"valid_until": valid_until,
36-
"min_lifetime": 1008,
37-
"max_client_to_self_delay": 2016,
38-
"min_payment_size_msat": "1000",
39-
"max_payment_size_msat": "1000000",
40-
}
41-
]
42-
}
19+
valid_until = (now + timedelta(hours=1)).isoformat().replace("+00:00", "Z")
20+
21+
return {
22+
"policy_opening_fee_params_menu": [
23+
{
24+
"min_fee_msat": "1000",
25+
"proportional": 1000,
26+
"valid_until": valid_until,
27+
"min_lifetime": 2000,
28+
"max_client_to_self_delay": 2016,
29+
"min_payment_size_msat": "1000",
30+
"max_payment_size_msat": "100000000",
31+
},
32+
{
33+
"min_fee_msat": "1092000",
34+
"proportional": 2400,
35+
"valid_until": valid_until,
36+
"min_lifetime": 1008,
37+
"max_client_to_self_delay": 2016,
38+
"min_payment_size_msat": "1000",
39+
"max_payment_size_msat": "1000000",
40+
},
41+
]
42+
}
43+
4344

4445
@plugin.method("dev-lsps2-getchannelcapacity")
4546
def lsps2_getchannelcapacity(request, init_payment_size, scid, opening_fee_params):
46-
""" Returns an opening fee menu for the LSPS2 plugin.
47-
"""
47+
"""Returns an opening fee menu for the LSPS2 plugin."""
4848
now = datetime.now(timezone.utc)
4949

5050
# Is ISO 8601 format "YYYY-MM-DDThh:mm:ss.uuuZ"
51-
valid_until = (now + timedelta(hours=1)).isoformat().replace('+00:00', 'Z')
51+
valid_until = (now + timedelta(hours=1)).isoformat().replace("+00:00", "Z")
5252

53-
return { "channel_capacity_msat": 100000000 }
53+
return {"channel_capacity_msat": 100000000}
5454

5555

5656
plugin.run()

0 commit comments

Comments
 (0)