Skip to content

Commit

Permalink
feat(types): add __dir__ to RESTObject to expose attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
spyoungtech committed Apr 14, 2020
1 parent efc6182 commit cad134c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gitlab/base.py
Expand Up @@ -111,6 +111,9 @@ def __ne__(self, other):
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__()
Expand Down

0 comments on commit cad134c

Please sign in to comment.