diff --git a/pyproject.toml b/pyproject.toml index 2405346e..0f69477b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ [build-system] requires = [ "setuptools == 78.1.0", - "setuptools_scm[toml] == 8.1.0", + "setuptools_scm[toml] == 8.2.0", "frequenz-repo-config[lib] == 0.13.2", ] build-backend = "setuptools.build_meta" @@ -57,11 +57,11 @@ cli = [ "asyncclick == 8.1.8", "prompt-toolkit == 3.0.50", "parsedatetime == 2.6", - "tzlocal == 5.2", + "tzlocal == 5.3.1", ] dev-flake8 = [ - "flake8 == 7.1.1", + "flake8 == 7.2.0", "flake8-docstrings == 1.7.0", "flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml "pydoclint == 0.6.5", @@ -70,7 +70,7 @@ dev-flake8 = [ dev-formatting = ["black == 25.1.0", "isort == 6.0.1"] dev-mkdocs = [ "black == 25.1.0", - "Markdown == 3.7", + "Markdown == 3.8", "mike == 2.1.3", "mkdocs-gen-files == 0.5.0", "mkdocs-literate-nav == 0.6.2", @@ -80,8 +80,8 @@ dev-mkdocs = [ "frequenz-repo-config[lib] == 0.13.2", ] dev-mypy = [ - "mypy == 1.14.1", - "types-Markdown == 3.7.0.20241204", + "mypy == 1.15.0", + "types-Markdown == 3.8.0.20250413", # For checking the noxfile, docs/ script, and tests "frequenz-client-dispatch[cli,dev-mkdocs,dev-noxfile,dev-pytest]", "grpc-stubs == 1.53.0.5", @@ -102,7 +102,7 @@ dev-pytest = [ "pytest-asyncio == 0.26.0", "async-solipsism == 0.7", "time-machine == 2.16.0", - "hypothesis == 6.124.9", + "hypothesis == 6.131.0", "frequenz-client-dispatch[cli]", ] dev = [ diff --git a/src/frequenz/client/dispatch/__main__.py b/src/frequenz/client/dispatch/__main__.py index cd9bf2d1..ad9f1854 100644 --- a/src/frequenz/client/dispatch/__main__.py +++ b/src/frequenz/client/dispatch/__main__.py @@ -425,9 +425,7 @@ async def create( click.echo("Dispatch created.") -# We could fix the mypy error by using ", /", but this causes issues with -# the click decorators. We can ignore the error here. -@cli.command() # type: ignore[arg-type] +@cli.command() @click.argument("microgrid-id", required=True, type=int) @click.argument("dispatch_id", type=int) @click.option("--start-time", type=FuzzyDateTime()) @@ -441,6 +439,7 @@ async def create( @click.pass_context async def update( ctx: click.Context, + /, microgrid_id: int, dispatch_id: int, **new_fields: dict[str, Any],