From 88002c7a03e3b27137a78b36fe7101901c04e7e9 Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Tue, 5 Sep 2023 10:03:07 +0200 Subject: [PATCH] Fix typing issue [noissue] --- pulpcore/cli/maven/repository.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pulpcore/cli/maven/repository.py b/pulpcore/cli/maven/repository.py index 05db73d..6fa8d9e 100644 --- a/pulpcore/cli/maven/repository.py +++ b/pulpcore/cli/maven/repository.py @@ -1,7 +1,7 @@ -from typing import Any, Dict +import typing as t import click -from pulp_glue.common.context import EntityFieldDefinition, PulpRemoteContext +from pulp_glue.common.context import EntityFieldDefinition, PulpRemoteContext, PulpRepositoryContext from pulp_glue.common.i18n import get_translation from pulp_glue.maven.context import PulpMavenArtifactContentContext, PulpMavenRepositoryContext from pulpcore.cli.common.generic import ( @@ -93,7 +93,7 @@ def repository(ctx: click.Context, pulp_ctx: PulpCLIContext, repo_type: str) -> @remote_option @pass_repository_context def add_cached_content( - repository_ctx: PulpMavenRepositoryContext, + repository_ctx: PulpRepositoryContext, remote: EntityFieldDefinition, ) -> None: """ @@ -101,7 +101,9 @@ def add_cached_content( content created by pulpcore-content to add to the repository. If a remote is not specified, the remote associated with the repository will be used. """ - body: Dict[str, Any] = {} + assert isinstance(repository_ctx, PulpMavenRepositoryContext) + + body: t.Dict[str, t.Any] = {} repository = repository_ctx.entity if remote: