File tree Expand file tree Collapse file tree 2 files changed +16
-12
lines changed
docs/source/release-notes Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 1- 2.0.0: 2020-01-06
1+ 2.0.0: 2020-01-10
22-----------------
33
44Features Added
@@ -10,6 +10,11 @@ Features Added
1010- Remove compatibility imports for Python 2.
1111- Remove dev-dependency for mock.
1212
13+ Bugs Fixed
14+ ``````````
15+
16+ * Key errors on Gist.history.
17+
1318Removals
1419````````
1520
@@ -56,4 +61,3 @@ Removals
5661- ``Organization#add_member `` add ``username `` to ``team ``.
5762- ``Organization#events `` use ``Organization#public_events ``
5863- ``Issue#assign `` use ``issues.issue.Issue.add_assignees ``
59-
Original file line number Diff line number Diff line change @@ -43,24 +43,24 @@ class GistHistory(models.GitHubCore):
4343 The number of deletions from the gist compared to the previous
4444 revision.
4545
46- .. attribute:: totoal
46+ .. attribute:: total
4747
4848 The total number of changes to the gist compared to the previous
4949 revision.
5050 """
5151
52- def _update_attributes (self , history ):
52+ def _update_attributes (self , history ) -> None :
5353 self .url = self ._api = history ["url" ]
5454 self .version = history ["version" ]
5555 self .user = users .ShortUser (history ["user" ], self )
56- self .change_status = history [ "change_status" ]
57- self .additions = self .change_status [ "additions" ]
58- self .deletions = self .change_status [ "deletions" ]
59- self .total = self .change_status [ "total" ]
60- self .committed_at = self ._strptime (history [ "committed_at" ] )
61-
62- def _repr (self ):
63- return "<Gist History [{0 }]>" . format ( self . version )
56+ self .change_status = history . get ( "change_status" )
57+ self .additions = self .change_status . get ( "additions" )
58+ self .deletions = self .change_status . get ( "deletions" )
59+ self .total = self .change_status . get ( "total" )
60+ self .committed_at = self ._strptime (history . get ( "committed_at" ) )
61+
62+ def _repr (self ) -> str :
63+ return f "<Gist History [{ self . version } ]>"
6464
6565 def gist (self ):
6666 """Retrieve the gist at this version.
You can’t perform that action at this time.
0 commit comments