@@ -1530,6 +1530,10 @@ def repository_content_command(**kwargs: t.Any) -> click.Group:
15301530 """A factory that creates a repository content command group."""
15311531
15321532 content_contexts = kwargs .pop ("contexts" , {})
1533+ list_kwargs = kwargs .pop ("list_kwargs" , {})
1534+ add_kwargs = kwargs .pop ("add_kwargs" , {})
1535+ remove_kwargs = kwargs .pop ("remove_kwargs" , {})
1536+ modify_kwargs = kwargs .pop ("modify_kwargs" , {})
15331537
15341538 def version_callback (
15351539 ctx : click .Context , param : click .Parameter , value : t .Optional [int ]
@@ -1540,7 +1544,7 @@ def version_callback(
15401544
15411545 # This is a mypy bug getting confused with positional args
15421546 # https://github.com/python/mypy/issues/15037
1543- @pulp_command ("list" ) # type: ignore [arg-type]
1547+ @pulp_command ("list" , ** list_kwargs ) # type: ignore [arg-type]
15441548 @click .option ("--all-types" , is_flag = True )
15451549 @limit_option
15461550 @offset_option
@@ -1563,7 +1567,7 @@ def content_list(
15631567 result = content_ctx .list (limit = limit , offset = offset , parameters = parameters )
15641568 pulp_ctx .output_result (result )
15651569
1566- @pulp_command ("add" )
1570+ @pulp_command ("add" , ** add_kwargs )
15671571 @repository_option
15681572 @click .option ("--base-version" , type = int , callback = version_callback )
15691573 @pass_content_context
@@ -1574,7 +1578,7 @@ def content_add(
15741578 repo_ctx = base_version .repository_ctx
15751579 repo_ctx .modify (add_content = [content_ctx .pulp_href ], base_version = base_version .pulp_href )
15761580
1577- @pulp_command ("remove" )
1581+ @pulp_command ("remove" , ** remove_kwargs )
15781582 @click .option ("--all" , is_flag = True , help = _ ("Remove all content from repository version" ))
15791583 @repository_option
15801584 @click .option ("--base-version" , type = int , callback = version_callback )
@@ -1588,7 +1592,7 @@ def content_remove(
15881592 remove_content = ["*" if all else content_ctx .pulp_href ]
15891593 repo_ctx .modify (remove_content = remove_content , base_version = base_version .pulp_href )
15901594
1591- @pulp_command ("modify" )
1595+ @pulp_command ("modify" , ** modify_kwargs )
15921596 @repository_option
15931597 @click .option ("--base-version" , type = int , callback = version_callback )
15941598 def content_modify (
0 commit comments