From 14212ea9022a2ea2d3de40501e5d7462b85acbb3 Mon Sep 17 00:00:00 2001 From: Felipe Date: Thu, 23 Sep 2021 17:43:14 -0500 Subject: [PATCH] test: code fix for PEP8 tests --- common/djangoapps/third_party_auth/pipeline.py | 3 +-- common/lib/xmodule/xmodule/capa_base.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/djangoapps/third_party_auth/pipeline.py b/common/djangoapps/third_party_auth/pipeline.py index 4cc112607fac..873c98ba6679 100644 --- a/common/djangoapps/third_party_auth/pipeline.py +++ b/common/djangoapps/third_party_auth/pipeline.py @@ -881,8 +881,7 @@ def user_details_force_sync(auth_entry, strategy, details, user=None, *args, **k 'https://iam.pearson.com:443/auth/saml-idp-uid', ] - if (details.get('first_name') and details.get('last_name') and - current_provider.entity_id in ies_entity_ids): + if (details.get('first_name') and details.get('last_name') and current_provider.entity_id in ies_entity_ids): fullname_value = '{} {}'.format(details.get('first_name'), details.get('last_name')) changed['fullname'] = fullname_value diff --git a/common/lib/xmodule/xmodule/capa_base.py b/common/lib/xmodule/xmodule/capa_base.py index 8facc93ad69d..128135c32637 100644 --- a/common/lib/xmodule/xmodule/capa_base.py +++ b/common/lib/xmodule/xmodule/capa_base.py @@ -1196,7 +1196,7 @@ def publish_grade(self, score=None, only_if_higher=None, **kwargs): def student_item_key(self): """ Get the student_item_dict required for the submissions API """ try: - user = self.runtime.get_real_user(self.runtime.anonymous_student_id) + user = self.runtime.get_real_user(self.runtime.anonymous_student_id) location = self.location.replace(branch=None, version=None) # Standardize the key in case it isn't already student_item = dict( student_id=user.id,