Skip to content

Commit be44b0f

Browse files
'Refactored by Sourcery' (#324)
Co-authored-by: Sourcery AI <>
1 parent 92cbb5d commit be44b0f

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

lms/lmsweb/git_service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ def handle_operation(self) -> flask.Response:
6969
user=self._user,
7070
)
7171

72-
res = self.build_response(data_out, git_operation)
73-
return res
72+
return self.build_response(data_out, git_operation)
7473

7574
def _execute_git_operation(self, git_operation: _GitOperation) -> bytes:
7675
proc = subprocess.Popen( # noqa: S603

tests/test_git_solution.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ def _send_git_request(
7070
headers = (
7171
('Authorization', f'Basic {encoded_credentials}'),
7272
)
73-
query_string = None
74-
if service is not None:
75-
query_string = {'service': service}
73+
query_string = {'service': service} if service is not None else None
7674
return getattr(client, method_name)(url, query_string=query_string, headers=headers, data=data)
7775

7876
def test_not_authorized_access(self, exercise: models.Exercise, student_user: models.User):

0 commit comments

Comments
 (0)