summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2020-04-14 08:23:49 +0200
committerGitHub <noreply@github.com>2020-04-14 08:23:49 +0200
commitc7c431af16f256f95a9553cf2e14925fa75f7d62 (patch)
treecebb8788207d491e5157999ce1136e932f381268
parentefc6182378509f1e66c55b3443c6afcb2873dc77 (diff)
parentcad134c078573c009af18160652182e39ab5b114 (diff)
downloadgitlab-c7c431af16f256f95a9553cf2e14925fa75f7d62.tar.gz
Merge pull request #1072 from spyoungtech/feat/restobject-dir
feat(types): add __dir__ to RESTObject to expose attributes
-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__()