Skip to content

Commit a263af9

Browse files
committed
Fix pep8 errors
1 parent f062e75 commit a263af9

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/server/oasisapi/analyses/v2_api/viewsets.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -422,16 +422,14 @@ def input_file(self, request, pk=None, version=None):
422422
"""
423423
return handle_related_file(self.get_object(), 'input_file', request, ['application/x-gzip', 'application/gzip', 'application/x-tar', 'application/tar'])
424424

425-
426-
@swagger_auto_schema(methods=['get'], responses={200: FILE_LIST_RESPONSE})
425+
@swagger_auto_schema(methods=["get"], responses={200: FILE_LIST_RESPONSE})
427426
@action(methods=['get'], detail=True)
428427
def input_file_tar_list(self, request, pk=None, version=None):
429428
"""
430429
get:
431430
List the files in `input_file`.
432431
"""
433-
return handle_get_related_file_tar(self.get_object(), 'input_file', request, ['application/x-gzip', 'application/gzip', 'application/x-tar', 'application/tar'])
434-
432+
return handle_get_related_file_tar(self.get_object(), "input_file", request, ["application/x-gzip", "application/gzip", "application/x-tar", "application/tar"])
435433

436434
@swagger_auto_schema(methods=['get'], responses={200: FILE_RESPONSE}, manual_parameters=[FILENAME_PARAM])
437435
@action(methods=['get'], detail=True)
@@ -442,8 +440,7 @@ def input_file_tar_extract(self, request, pk=None, version=None):
442440
"""
443441
return handle_get_related_file_tar(self.get_object(), 'input_file', request, ['application/x-gzip', 'application/gzip', 'application/x-tar', 'application/tar'])
444442

445-
446-
@swagger_auto_schema(methods=['get'], responses={200: FILE_RESPONSE})
443+
@swagger_auto_schema(methods=["get"], responses={200: FILE_RESPONSE})
447444
@action(methods=['get'], detail=True)
448445
def lookup_errors_file(self, request, pk=None, version=None):
449446
"""
@@ -534,7 +531,7 @@ def output_file_tar_list(self, request, pk=None, version=None):
534531
get:
535532
List the files in `output_file`.
536533
"""
537-
return handle_get_related_file_tar(self.get_object(), 'output_file', request, ['application/x-gzip', 'application/gzip', 'application/x-tar', 'application/tar'])
534+
return handle_get_related_file_tar(self.get_object(), "output_file", request, ["application/x-gzip", "application/gzip", "application/x-tar", "application/tar"])
538535

539536
@swagger_auto_schema(methods=['get'], responses={200: FILE_RESPONSE}, manual_parameters=[FILENAME_PARAM])
540537
@action(methods=['get'], detail=True)

src/server/oasisapi/files/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def extract_file_from_tar(RelatedFile, fname):
4444

4545
return tarf.extractfile(fname)
4646

47+
4748
def random_file_name(instance, filename):
4849
if getattr(instance, "store_as_filename", False):
4950
return filename

src/server/oasisapi/schemas/custom_swagger.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@
3232

3333

3434
FILE_LIST_RESPONSE = openapi.Response(
35-
'File List',
36-
schema = Schema(type=openapi.TYPE_ARRAY,
37-
items=Schema(title='File Name', type=openapi.TYPE_STRING))
35+
"File List",
36+
schema=Schema(
37+
type=openapi.TYPE_ARRAY,
38+
items=Schema(title="File Name", type=openapi.TYPE_STRING),
39+
),
3840
)
3941

4042

0 commit comments

Comments
 (0)