This repository was archived by the owner on May 22, 2021. It is now read-only.
File tree 4 files changed +7
-7
lines changed
4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ def _update_attributes(self, event):
68
68
self .commit_url = event ['commit_url' ]
69
69
self .created_at = event ['created_at' ]
70
70
self .event = event ['event' ]
71
- self .id = self . _get_attribute ( event , 'id' )
71
+ self .id = event [ 'id' ]
72
72
self ._uniq = self .commit_id
73
73
74
74
def _repr (self ):
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ class PagesBuild(models.GitHubCore):
74
74
75
75
def _update_attributes (self , build ):
76
76
from .. import users
77
- self ._api = self . _get_attribute ( build , 'url' )
77
+ self ._api = build [ 'url' ]
78
78
self .commit = build ['commit' ]
79
79
self .created_at = self ._strptime (build ['created_at' ])
80
80
self .duration = build ['duration' ]
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class ContributorStats(models.GitHubCore):
76
76
def _update_attributes (self , stats_object ):
77
77
self .author = users .ShortUser (stats_object ['author' ], self )
78
78
self .total = stats_object ['total' ]
79
- self .weeks = self . _get_attribute ( stats_object , 'weeks' , [])
79
+ self .weeks = stats_object [ 'weeks' ]
80
80
alt_weeks = self .weeks
81
81
if alt_weeks :
82
82
alt_weeks = [alternate_week (w ) for w in self .weeks ]
Original file line number Diff line number Diff line change @@ -144,11 +144,11 @@ def _update_attributes(self, combined_status):
144
144
self .repository = repo .ShortRepository (
145
145
combined_status ['repository' ], self ,
146
146
)
147
- self .sha = self . _get_attribute ( combined_status , 'sha' )
148
- self .state = self . _get_attribute ( combined_status , 'state' )
149
- statuses = self . _get_attribute ( combined_status , 'statuses' , [])
147
+ self .sha = combined_status [ 'sha' ]
148
+ self .state = combined_status [ 'state' ]
149
+ statuses = combined_status [ 'statuses' ]
150
150
self .statuses = [ShortStatus (s , self ) for s in statuses ]
151
- self .total_count = self . _get_attribute ( combined_status , 'total_count' )
151
+ self .total_count = combined_status [ 'total_count' ]
152
152
153
153
def _repr (self ):
154
154
f = '<CombinedStatus [{s.state}:{s.total_count} sub-statuses]>'
You can’t perform that action at this time.
0 commit comments