File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 22
22
Dict ,
23
23
List ,
24
24
Optional ,
25
+ Tuple ,
25
26
Type ,
26
27
TYPE_CHECKING ,
27
28
Union ,
@@ -186,6 +187,7 @@ def refresh(self, **kwargs: Any) -> None:
186
187
class ListMixin (_RestManagerBase ):
187
188
_computed_path : Optional [str ]
188
189
_from_parent_attrs : Dict [str , Any ]
190
+ _list_filters : Tuple [str , ...] = ()
189
191
_obj_cls : Optional [Type [base .RESTObject ]]
190
192
_parent : Optional [base .RESTObject ]
191
193
_parent_attrs : Dict [str , Any ]
Original file line number Diff line number Diff line change @@ -145,13 +145,10 @@ def _populate_sub_parser_by_class(cls, sub_parser):
145
145
)
146
146
147
147
if action_name == "list" :
148
- if hasattr (mgr_cls , "_list_filters" ):
149
- [
150
- sub_parser_action .add_argument (
151
- "--%s" % x .replace ("_" , "-" ), required = False
152
- )
153
- for x in mgr_cls ._list_filters
154
- ]
148
+ for x in mgr_cls ._list_filters :
149
+ sub_parser_action .add_argument (
150
+ "--%s" % x .replace ("_" , "-" ), required = False
151
+ )
155
152
156
153
sub_parser_action .add_argument ("--page" , required = False )
157
154
sub_parser_action .add_argument ("--per-page" , required = False )
You can’t perform that action at this time.
0 commit comments