make format (#139)

This commit is contained in:
calle
2023-03-08 19:27:01 +01:00
committed by GitHub
parent 4d391382b1
commit 2d3a29ad94
2 changed files with 25 additions and 7 deletions

View File

@@ -396,7 +396,9 @@ async def receive(ctx: Context, token: str, lock: str):
@click.option(
"--nostr", "-n", default=False, is_flag=True, help="Receive tokens via nostr."
)
@click.option("--all", "-a", default=False, is_flag=True, help="Receive all pending tokens.")
@click.option(
"--all", "-a", default=False, is_flag=True, help="Receive all pending tokens."
)
@click.option(
"--verbose",
"-v",
@@ -407,7 +409,9 @@ async def receive(ctx: Context, token: str, lock: str):
)
@click.pass_context
@coro
async def receive_cli(ctx: Context, token: str, lock: str, nostr: bool, all: bool, verbose: bool):
async def receive_cli(
ctx: Context, token: str, lock: str, nostr: bool, all: bool, verbose: bool
):
wallet: Wallet = ctx.obj["WALLET"]
wallet.status()
if token:
@@ -464,8 +468,15 @@ async def burn(ctx: Context, token: str, all: bool, force: bool):
help="Print legacy token without mint information.",
type=bool,
)
@click.option("--number", "-n", default=None, help='Show only n pending tokens.', type=int)
@click.option("--offset", default=0, help='Show pending tokens only starting from offset.', type=int)
@click.option(
"--number", "-n", default=None, help="Show only n pending tokens.", type=int
)
@click.option(
"--offset",
default=0,
help="Show pending tokens only starting from offset.",
type=int,
)
@click.pass_context
@coro
async def pending(ctx: Context, legacy, number: int, offset: int):
@@ -476,8 +487,15 @@ async def pending(ctx: Context, legacy, number: int, offset: int):
sorted_proofs = sorted(reserved_proofs, key=itemgetter("send_id")) # type: ignore
if number:
number += offset
for i, (key, value) in islice(enumerate(
groupby(sorted_proofs, key=itemgetter("send_id"),)), offset, number
for i, (key, value) in islice(
enumerate(
groupby(
sorted_proofs,
key=itemgetter("send_id"),
)
),
offset,
number,
):
grouped_proofs = list(value)
token = await wallet.serialize_proofs(grouped_proofs)