Skip to content

Commit 0316e90

Browse files
committed
Fix flake8
Signed-off-by: Santiago Dueñas <sduenas@bitergia.com>
1 parent 0079757 commit 0316e90

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

sortinghat/core/importer/backends/eclipse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def fetch_employment_history(self, eclipsefdn_id):
239239
logger.info(f"Employment history fetched; url={url}, eclipsefdn_id={eclipsefdn_id}")
240240
return data
241241

242-
def _fetch(self, url:str, params=None):
242+
def _fetch(self, url, params=None):
243243
"""Generic query to Eclipse usr API."""
244244

245245
response = requests.get(url, params=params, auth=self.token)
@@ -258,6 +258,6 @@ def _authenticate(self, client_id, client_secret, scope):
258258
client_id=client_id,
259259
client_secret=client_secret,
260260
)
261-
token = oauth2client.client_credentials(scope=scope)
261+
token = oauth2client.client_credentials(scope=scope)
262262

263263
return BearerToken(token)

tests/test_eclipse.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
import datetime
2-
import json
32
import os
43

54
from unittest.mock import patch
65

76
import httpretty
87
from dateutil.tz import tzutc
9-
from django.test import TestCase, override_settings
8+
from django.test import TestCase
109
from django.contrib.auth import get_user_model
1110

1211
from sortinghat.core import api
1312
from sortinghat.core.context import SortingHatContext
1413
from sortinghat.core.models import Individual, MAX_PERIOD_DATE, MIN_PERIOD_DATE
1514

16-
from sortinghat.core.importer.backends.eclipse import EclipseFoundationAccountsImporter, EclipseFoundationAPIClient
15+
from sortinghat.core.importer.backends.eclipse import EclipseFoundationAccountsImporter
1716

1817

1918
ECLIPSE_API_URL = "https://api.eclipse.org"
@@ -242,7 +241,6 @@ def test_import_enrollments(self, mock_login):
242241

243242
individuals = Individual.objects.order_by('mk').all()
244243

245-
246244
self.assertEqual(len(individuals), 3)
247245

248246
# John Doe

0 commit comments

Comments
 (0)