Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9a16bdd

Browse files
committed
fix(cli): allow exclusive arguments as optional
The CLI takes its arguments from the RequiredOptional, which has three fields: required, optional, and exclusive. In practice, the exclusive options are not defined as either required or optional, and would not be allowed in the CLI. This changes that, so that exclusive options are also added to the argument parser.Closes#2769
1 parent72e1aa7 commit9a16bdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎gitlab/v4/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def _populate_sub_parser_by_class(
258258
sub_parser_action.add_argument(
259259
f"--{x.replace('_','-')}",required=True
260260
)
261-
forxinmgr_cls._create_attrs.optional:
261+
forxinmgr_cls._create_attrs.optional+mgr_cls._create_attrs.exclusive:
262262
sub_parser_action.add_argument(
263263
f"--{x.replace('_','-')}",required=False
264264
)
@@ -274,7 +274,7 @@ def _populate_sub_parser_by_class(
274274
f"--{x.replace('_','-')}",required=True
275275
)
276276

277-
forxinmgr_cls._update_attrs.optional:
277+
forxinmgr_cls._update_attrs.optional+mgr_cls._update_attrs.exclusive:
278278
ifx!=cls._id_attr:
279279
sub_parser_action.add_argument(
280280
f"--{x.replace('_','-')}",required=False

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp