Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 3, 2024
1 parent da629c4 commit b58c79c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .secrets.baseline
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.4.0",
"version": "1.5.0",
"plugins_used": [
{
"name": "ArtifactoryDetector"
Expand Down
2 changes: 1 addition & 1 deletion authentication/pipeline/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def create_user_via_email(
"username": f"The username '{username}' is already taken. Please try a different username."
},
)
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise UserCreationFailedException(backend, current_partial) from exc

return {"is_new": True, "user": created_user, "username": created_user.username}
Expand Down
4 changes: 2 additions & 2 deletions flexiblepricing/management/commands/configure_tiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def handle(self, *args, **kwargs): # pylint: disable=unused-argument # noqa: A
if "course" in kwargs and kwargs["course"] is not None
else None
)
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise CommandError(
f"Couldn't find the course {kwargs['course']}, stopping." # noqa: EM102
) from exc
Expand All @@ -89,7 +89,7 @@ def handle(self, *args, **kwargs): # pylint: disable=unused-argument # noqa: A
if "program" in kwargs and kwargs["program"] is not None
else None
)
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise CommandError(
f"Couldn't find the program {kwargs['program']}, stopping." # noqa: EM102
) from exc
Expand Down
8 changes: 4 additions & 4 deletions openedx/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def repair_faulty_edx_user(user):
created_user, created_auth_token = False, False
try:
created_user = create_edx_user(user)
except Exception as e: # noqa: BLE001
except Exception as e:
# 409 means we have a username conflict - pass in that case so we can
# try to create the api auth tokens; re-raise otherwise

Expand Down Expand Up @@ -672,7 +672,7 @@ def enroll_in_edx_course_runs(
results.append(enrollment)
except HTTPError as exc: # noqa: PERF203
raise EdxApiEnrollErrorException(user, course_run, exc) from exc
except Exception as exc: # pylint: disable=broad-except # noqa: BLE001
except Exception as exc: # pylint: disable=broad-except
raise UnknownEdxApiEnrollException(user, course_run, exc) from exc
return results

Expand Down Expand Up @@ -848,7 +848,7 @@ def subscribe_to_edx_course_emails(user, course_run):
result = edx_client.email_settings.subscribe(course_run.courseware_id)
except HTTPError as exc:
raise EdxApiEmailSettingsErrorException(user, course_run, exc) from exc
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise UnknownEdxApiEmailSettingsException(user, course_run, exc) from exc
return result

Expand All @@ -874,7 +874,7 @@ def unsubscribe_from_edx_course_emails(user, course_run):
result = edx_client.email_settings.unsubscribe(course_run.courseware_id)
except HTTPError as exc:
raise EdxApiEmailSettingsErrorException(user, course_run, exc) from exc
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise UnknownEdxApiEmailSettingsException(user, course_run, exc) from exc
return result

Expand Down

0 comments on commit b58c79c

Please sign in to comment.