Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc7c431a

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

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
returnself.get_id()!=other.get_id()
112112
returnsuper(RESTObject,self)!=other
113113

114+
def__dir__(self):
115+
returnsuper(RESTObject,self).__dir__()+list(self.attributes)
116+
114117
def__hash__(self):
115118
ifnotself.get_id():
116119
returnsuper(RESTObject,self).__hash__()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp