diff options
author | John L. Villalovos <john@sodarock.com> | 2021-04-24 12:24:49 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2021-04-24 12:26:46 -0700 |
commit | 89331131b3337308bacb0c4013e80a4809f3952c (patch) | |
tree | 7cbe735bba997e61294df720db03616763787a8d /gitlab/mixins.py | |
parent | cfc42d246a4fc9a9afa9a676efcac0774e909aab (diff) | |
download | gitlab-89331131b3337308bacb0c4013e80a4809f3952c.tar.gz |
chore: make ListMixin._list_filters always present
Always create ListMixin._list_filters attribute with a default value
of tuple().
This way we don't need to use hasattr() and we will know the type of
the attribute.
Diffstat (limited to 'gitlab/mixins.py')
-rw-r--r-- | gitlab/mixins.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gitlab/mixins.py b/gitlab/mixins.py index a22fea4..4c3e46e 100644 --- a/gitlab/mixins.py +++ b/gitlab/mixins.py @@ -22,6 +22,7 @@ from typing import ( Dict, List, Optional, + Tuple, Type, TYPE_CHECKING, Union, @@ -186,6 +187,7 @@ class RefreshMixin(_RestObjectBase): class ListMixin(_RestManagerBase): _computed_path: Optional[str] _from_parent_attrs: Dict[str, Any] + _list_filters: Tuple[str, ...] = () _obj_cls: Optional[Type[base.RESTObject]] _parent: Optional[base.RESTObject] _parent_attrs: Dict[str, Any] |