From f4fe1b058b6ebd9f2387dd222c2abc455c7762d7 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" Date: Wed, 27 Jun 2018 15:18:57 +0200 Subject: [PATCH] swh.lister.*: Formatting --- swh/lister/bitbucket/lister.py | 20 ++++++++++---------- swh/lister/github/lister.py | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/swh/lister/bitbucket/lister.py b/swh/lister/bitbucket/lister.py index 53f359a..7bc2c1a 100644 --- a/swh/lister/bitbucket/lister.py +++ b/swh/lister/bitbucket/lister.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017 the Software Heritage developers +# Copyright (C) 2017-2018 the Software Heritage developers # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information @@ -14,15 +14,15 @@ class BitBucketLister(SWHIndexingHttpLister): def get_model_from_repo(self, repo): return { - 'uid': repo['uuid'], - 'indexable': repo['created_on'], - 'name': repo['name'], - 'full_name': repo['full_name'], - 'html_url': repo['links']['html']['href'], - 'origin_url': repo['links']['clone'][0]['href'], - 'origin_type': repo['scm'], - 'description': repo['description'] - } + 'uid': repo['uuid'], + 'indexable': repo['created_on'], + 'name': repo['name'], + 'full_name': repo['full_name'], + 'html_url': repo['links']['html']['href'], + 'origin_url': repo['links']['clone'][0]['href'], + 'origin_type': repo['scm'], + 'description': repo['description'] + } def get_next_target_from_response(self, response): body = response.json() diff --git a/swh/lister/github/lister.py b/swh/lister/github/lister.py index af27899..30d4290 100644 --- a/swh/lister/github/lister.py +++ b/swh/lister/github/lister.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017 the Software Heritage developers +# Copyright (C) 2017-2018 the Software Heritage developers # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information @@ -16,16 +16,16 @@ class GitHubLister(SWHIndexingHttpLister): def get_model_from_repo(self, repo): return { - 'uid': repo['id'], - 'indexable': repo['id'], - 'name': repo['name'], - 'full_name': repo['full_name'], - 'html_url': repo['html_url'], - 'origin_url': repo['html_url'], - 'origin_type': 'git', - 'description': repo['description'], - 'fork': repo['fork'], - } + 'uid': repo['id'], + 'indexable': repo['id'], + 'name': repo['name'], + 'full_name': repo['full_name'], + 'html_url': repo['html_url'], + 'origin_url': repo['html_url'], + 'origin_type': 'git', + 'description': repo['description'], + 'fork': repo['fork'], + } def transport_quota_check(self, response): reqs_remaining = int(response.headers['X-RateLimit-Remaining'])