From 0391589abe563bbbe96455fd0359105418478fd8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 18:08:19 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .secrets.baseline | 9 +-------- courseware/api.py | 3 +-- courseware/api_test.py | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index d4e8cf92a7..394d32a6c5 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -213,13 +213,6 @@ "hashed_secret": "b235838f76594bf21886c6eec9c06a207e9ec5ce", "is_verified": false, "line_number": 35 - }, - { - "type": "Secret Keyword", - "filename": "pytest.ini", - "hashed_secret": "e035cdf1f57666859ec5949ee389d479d03ea1e3", - "is_verified": false, - "line_number": 36 } ], "sheets/dev-setup.md": [ @@ -284,5 +277,5 @@ } ] }, - "generated_at": "2024-04-30T20:24:02Z" + "generated_at": "2024-05-16T18:08:17Z" } diff --git a/courseware/api.py b/courseware/api.py index f001844f66..0127ee00c3 100644 --- a/courseware/api.py +++ b/courseware/api.py @@ -742,8 +742,7 @@ def unenroll_edx_course_run(run_enrollment): edx_client = get_edx_api_service_client() try: deactivated_enrollment = edx_client.enrollments.deactivate_enrollment( - run_enrollment.run.courseware_id, - username=run_enrollment.user.username + run_enrollment.run.courseware_id, username=run_enrollment.user.username ) except HTTPError as exc: raise EdxApiEnrollErrorException(run_enrollment.user, run_enrollment.run, exc) # noqa: B904, TRY200 diff --git a/courseware/api_test.py b/courseware/api_test.py index f389dddd68..ada5d71125 100644 --- a/courseware/api_test.py +++ b/courseware/api_test.py @@ -718,7 +718,7 @@ def test_unenroll_edx_course_run(mocker): courseware_id = run_enrollment.run.courseware_id username = run_enrollment.user.username enroll_return_value = mocker.Mock( - json={"course_id": courseware_id, 'user': username} + json={"course_id": courseware_id, "user": username} ) mock_client.enrollments.deactivate_enrollment = mocker.Mock( return_value=enroll_return_value