diff --git a/pyproject.toml b/pyproject.toml index 114052e..9cb4b6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ [build-system] requires = [ "setuptools == 82.0.1", - "setuptools_scm[toml] == 10.0.5", + "setuptools_scm[toml] == 10.2.0", "frequenz-repo-config[lib] == 0.18.0", ] build-backend = "setuptools.build_meta" @@ -55,10 +55,10 @@ email = "floss@frequenz.com" [project.optional-dependencies] cli = [ - "asyncclick == 8.3.0.7", + "asyncclick == 8.4.2.1", "prompt-toolkit == 3.0.52", "parsedatetime == 2.6", - "tzlocal == 5.3.1", + "tzlocal == 5.4.4", ] dev-flake8 = [ @@ -99,7 +99,7 @@ dev-pylint = [ "frequenz-api-dispatch == 1.0.0", ] dev-pytest = [ - "pytest == 9.0.3", + "pytest == 9.1.1", "frequenz-repo-config[extra-lint-examples] == 0.18.0", "pytest-mock == 3.15.1", "pytest-asyncio == 1.4.0", diff --git a/src/frequenz/client/dispatch/_cli_types.py b/src/frequenz/client/dispatch/_cli_types.py index 5ae8b7d..4b83fdf 100644 --- a/src/frequenz/client/dispatch/_cli_types.py +++ b/src/frequenz/client/dispatch/_cli_types.py @@ -29,7 +29,7 @@ # pylint: disable=inconsistent-return-statements -class FuzzyDateTime(click.ParamType): +class FuzzyDateTime(click.ParamType[datetime | Literal["NOW"] | None]): """Try to parse a string as a datetime. The parser is very permissive and can handle a wide range of time expressions. @@ -73,7 +73,7 @@ def convert( ) -class FuzzyTimeDelta(click.ParamType): +class FuzzyTimeDelta(click.ParamType[timedelta]): """Try to parse a string as a timedelta. Uses parsedatetime and tries to parse it as relative datetime first that @@ -118,7 +118,7 @@ def convert( ) -class FuzzyIntRange(click.ParamType): +class FuzzyIntRange(click.ParamType[list[int]]): """Try to parse a string as a simple integer range. Possible formats: @@ -154,7 +154,7 @@ def convert( self.fail(f"Invalid integer range: {value}", param, ctx) -class TargetComponentParamType(click.ParamType): +class TargetComponentParamType(click.ParamType[TargetIds | TargetCategories]): """Click parameter type for targets.""" name = "target" @@ -236,7 +236,7 @@ def enum_from_str( ) -class JsonDictParamType(click.ParamType): +class JsonDictParamType(click.ParamType[dict[str, Any]]): """Click parameter type for JSON strings.""" name = "json"