8000 Drop explicit return values for `Dict`.get() · staticdev/github4.py@1bbf620 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on May 22, 2021. It is now read-only.

Commit 1bbf620

Browse files
committed
Drop explicit return values for Dict.get()
The `.get()` method on dicts returns `None` by default, remove unnecessary explicit references.
1 parent ca631f8 commit 1bbf620

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

github3/repos/repo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,20 +2455,20 @@ def _update_attributes(self, repo):
24552455
self.has_wiki = repo['has_wiki']
24562456
self.homepage = repo['homepage']
24572457
self.language = repo['language']
2458-
self.original_license = repo.get('license', None)
2458+
self.original_license = repo.get('license')
24592459
if self.original_license is not None:
24602460
self.original_license = licenses.ShortLicense(
24612461
self.original_license, self
24622462
)
24632463
self.mirror_url = repo['mirror_url']
24642464
self.network_count = repo['network_count']
24652465
self.open_issues_count = repo['open_issues_count']
2466-
self.parent = repo.get('parent', None)
2466+
self.parent = repo.get('parent')
24672467
if self.parent is not None:
24682468
self.parent = ShortRepository(self.parent, self)
24692469
self.pushed_at = self._strptime(repo['pushed_at'])
24702470
self.size = repo['size']
2471-
self.source = repo.get('source', None)
2471+
self.source = repo.get('source')
24722472
if self.source is not None:
24732473
self.source = ShortRepository(self.source, self)
24742474
self.ssh_url = repo['ssh_url']

0 commit comments

Comments
 (0)
0