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

Commit6f733b1

Browse files
committed
Update github3.auths to remove get_attribute
1 parentf64a47e commit6f733b1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎github3/auths.py‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,34 @@ class Authorization(GitHubCore):
3131
"""
3232

3333
def_update_attributes(self,auth):
34-
self._api=self._get_attribute(auth,'url')
34+
self._api=auth['url']
3535

3636
#: Details about the application (name, url)
37-
self.app=self._get_attribute(auth,'app', {})
37+
self.app=auth['app']
3838

3939
#: Returns the Authorization token
40-
self.token=self._get_attribute(auth,'token')
40+
self.token=auth['token']
4141

4242
#: App name
43-
self.name=self._get_attribute(self.app,'name')
43+
self.name=self.app['name']
4444

4545
#: URL about the note
46-
self.note_url=self._get_attribute(auth,'note_url')
46+
self.note_url=auth['note_url']
4747

4848
#: Note about the authorization
49-
self.note=self._get_attribute(auth,'note')
49+
self.note=auth['note']
5050

5151
#: List of scopes this applies to
52-
self.scopes=self._get_attribute(auth,'scopes')
52+
self.scopes=auth['scopes']
5353

5454
#: Unique id of the authorization
55-
self.id=self._get_attribute(auth,'id')
55+
self.id=auth['id']
5656

5757
#: datetime object representing when the authorization was created.
58-
self.created_at=self._strptime_attribute(auth,'created_at')
58+
self.created_at=self._strptime(auth['created_at'])
5959

6060
#: datetime object representing when the authorization was updated.
61-
self.updated_at=self._strptime_attribute(auth,'updated_at')
61+
self.updated_at=self._strptime(auth['updated_at'])
6262

6363
def_repr(self):
6464
return'<Authorization [{0}]>'.format(self.name)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp