FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(types): add __dir__ to RESTObject to expose attributes · oux/python-gitlab@cad134c · GitHub

Repository navigation

Commit cad134c

Browse files
committed
feat(types): add __dir__ to RESTObject to expose attributes
1 parent efc6182 commit cad134c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎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)

Back | FazBrowse Home | New Git URL