8000 fix(cli): make 'per_page' and 'page' type explicit · python-gitlab/python-gitlab@d493a5e · GitHub
[go: up one dir, main page]

Skip to content

Commit d493a5e

Browse files
fix(cli): make 'per_page' and 'page' type explicit
1 parent bbb7df5 commit d493a5e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

gitlab/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ def _get_base_parser(add_help: bool = True) -> argparse.ArgumentParser:
197197
"[env var: GITLAB_PER_PAGE]"
198198
),
199199
required=False,
200+
type=int,
200201
default=os.getenv("GITLAB_PER_PAGE"),
201202
)
202203
parser.add_argument(

gitlab/v4/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ def _populate_sub_parser_by_class(
218218
f"--{x.replace('_', '-')}", required=False
219219
)
220220

221-
sub_parser_action.add_argument("--page", required=False)
222-
sub_parser_action.add_argument("--per-page", required=False)
221+
sub_parser_action.add_argument("--page", required=False, type=int)
222+
sub_parser_action.add_argument("--per-page", required=False, type=int)
223223
sub_parser_action.add_argument("--all", required=False, action="store_true")
224 401F 224

225225
if action_name == "delete":

0 commit comments

Comments
 (0)
0