8000 Rename fork_count repo attribute to forks_count · rlevit/github3.py@2e5349a · GitHub
[go: up one dir, main page]

Skip to content

Commit 2e5349a

Browse files
author
John Barbuto
committed
Rename fork_count repo attribute to forks_count
The API response has forks_count, as can be seen in the API doc at https://developer.github.com/v3/repos/#response and the fake data at https://github.com/sigmavirus24/github3.py/blob/4daa290/tests/unit/test_repos_repo.py#L32 The previous attribute was kept for backward compatibility, if desired.
1 parent 310dd4b commit 2e5349a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

github3/repos/repo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ def __init__(self, repo, session=None):
7171
self.forks = repo.get('forks', 0)
7272

7373
#: The number of forks of this repository.
74-
self.fork_count = repo.get('fork_count')
74+
self.forks_count = repo.get('forks_count')
75+
# For backward compatibility
76+
self.fork_count = self.forks_count
7577

7678
#: Is this repository a fork?
7779
self.fork = repo.get('fork')

0 commit comments

Comments
 (0)
0