This repository was archived by the owner on May 22, 2021. It is now read-only.
File tree 2 files changed +12
-8
lines changed
docs/source/release-notes
2 files changed +12
-8
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
2
2
-----------------
3
3
4
4
Features Added
@@ -10,6 +10,11 @@ Features Added
10
10
- Remove compatibility imports for Python 2.
11
11
- Remove dev-dependency for mock.
12
12
13
+ Bugs Fixed
14
+ ``````````
15
+
16
+ * Key errors on Gist.history.
17
+
13
18
Removals
14
19
````````
15
20
@@ -56,4 +61,3 @@ Removals
56
61
- ``Organization#add_member `` add ``username `` to ``team ``.
57
62
- ``Organization#events `` use ``Organization#public_events ``
58
63
- ``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):
43
43
The number of deletions from the gist compared to the previous
44
44
revision.
45
45
46
- .. attribute:: totoal
46
+ .. attribute:: total
47
47
48
48
The total number of changes to the gist compared to the previous
49
49
revision.
50
50
"""
51
51
52
- def _update_attributes (self , history ):
52
+ def _update_attributes (self , history ) -> None :
53
53
self .url = self ._api = history ["url" ]
54
54
self .version = history ["version" ]
55
55
self .user = users .ShortUser (history ["user" ], self )
56
56
self .change_status = history ["change_status" ]
57
- self .additions = self .change_status [ "additions" ]
58
- self .deletions = self .change_status [ "deletions" ]
57
+ self .additions = self .change_status . get ( "additions" )
58
+ self .deletions = self .change_status . get ( "deletions" )
59
59
self .total = self .change_status ["total" ]
60
60
self .committed_at = self ._strptime (history ["committed_at" ])
61
61
62
- def _repr (self ):
63
- return "<Gist History [{0 }]>" . format ( self . version )
62
+ def _repr (self ) -> str :
63
+ return f "<Gist History [{ self . version } ]>"
64
64
65
65
def gist (self ):
66
66
"""Retrieve the gist at this version.
You can’t perform that action at this time.
0 commit comments