summaryrefslogtreecommitdiff
path: root/gitlab/v4/cli.py
diff options
context:
space:
mode:
authorMax Wittig <max.wittig.ch@gmail.com>2021-04-25 16:35:30 +0200
committerGitHub <noreply@github.com>2021-04-25 16:35:30 +0200
commit62c75b5e637858f0e9ef7bed21a347bbd5e0b972 (patch)
tree2474ef09c081ed00506900bd90d9fbe91ed256ad /gitlab/v4/cli.py
parent09522b356386f4e2ceef7e8c2604269e0682ed20 (diff)
parent89331131b3337308bacb0c4013e80a4809f3952c (diff)
downloadgitlab-62c75b5e637858f0e9ef7bed21a347bbd5e0b972.tar.gz
Merge pull request #1411 from JohnVillalovos/jlvillal/list_filters
chore: make ListMixin._list_filters always present
Diffstat (limited to 'gitlab/v4/cli.py')
-rw-r--r--gitlab/v4/cli.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py
index b03883e..76eb1cb 100644
--- a/gitlab/v4/cli.py
+++ b/gitlab/v4/cli.py
@@ -145,13 +145,10 @@ def _populate_sub_parser_by_class(cls, sub_parser):
)
if action_name == "list":
- if hasattr(mgr_cls, "_list_filters"):
- [
- sub_parser_action.add_argument(
- "--%s" % x.replace("_", "-"), required=False
- )
- for x in mgr_cls._list_filters
- ]
+ for x in mgr_cls._list_filters:
+ sub_parser_action.add_argument(
+ "--%s" % x.replace("_", "-"), required=False
+ )
sub_parser_action.add_argument("--page", required=False)
sub_parser_action.add_argument("--per-page", required=False)