Skip to content

Commit c7c431a

Browse files
authored
Merge pull request #1072 from spyoungtech/feat/restobject-dir
feat(types): add __dir__ to RESTObject to expose attributes
2 parents efc6182 + cad134c commit c7c431a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gitlab/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ def __ne__(self, other):
111111
return self.get_id() != other.get_id()
112112
return super(RESTObject, self) != other
113113

114+
def __dir__(self):
115+
return super(RESTObject, self).__dir__() + list(self.attributes)
116+
114117
def __hash__(self):
115118
if not self.get_id():
116119
return super(RESTObject, self).__hash__()

0 commit comments

Comments
 (0)