Skip to content

Commit a88a26c

Browse files
committed
Fix click decorator typing
It seems like the new version fixed the issue and now we can use a positional-only argument for the context. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 79dd051 commit a88a26c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/frequenz/client/dispatch/__main__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,7 @@ async def create(
425425
click.echo("Dispatch created.")
426426

427427

428-
# We could fix the mypy error by using ", /", but this causes issues with
429-
# the click decorators. We can ignore the error here.
430-
@cli.command() # type: ignore[arg-type]
428+
@cli.command()
431429
@click.argument("microgrid-id", required=True, type=int)
432430
@click.argument("dispatch_id", type=int)
433431
@click.option("--start-time", type=FuzzyDateTime())
@@ -441,6 +439,7 @@ async def create(
441439
@click.pass_context
442440
async def update(
443441
ctx: click.Context,
442+
/,
444443
microgrid_id: int,
445444
dispatch_id: int,
446445
**new_fields: dict[str, Any],

0 commit comments

Comments
 (0)