summaryrefslogtreecommitdiff
path: root/gitlab/base.py
diff options
context:
space:
mode:
authorSpencer Young <spencer.young@spyoung.com>2020-04-13 18:07:31 -0700
committerSpencer Young <spencer.young@spyoung.com>2020-04-13 18:07:31 -0700
commitcad134c078573c009af18160652182e39ab5b114 (patch)
treecebb8788207d491e5157999ce1136e932f381268 /gitlab/base.py
parentefc6182378509f1e66c55b3443c6afcb2873dc77 (diff)
downloadgitlab-cad134c078573c009af18160652182e39ab5b114.tar.gz
feat(types): add __dir__ to RESTObject to expose attributes
Diffstat (limited to 'gitlab/base.py')
-rw-r--r--gitlab/base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gitlab/base.py b/gitlab/base.py
index bc27237..40bc06c 100644
--- a/gitlab/base.py
+++ b/gitlab/base.py
@@ -111,6 +111,9 @@ class RESTObject(object):
return self.get_id() != other.get_id()
return super(RESTObject, self) != other
+ def __dir__(self):
+ return super(RESTObject, self).__dir__() + list(self.attributes)
+
def __hash__(self):
if not self.get_id():
return super(RESTObject, self).__hash__()