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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy