diff --git a/Makefile b/Makefile index e66c48d..a894376 100644 --- a/Makefile +++ b/Makefile @@ -71,8 +71,8 @@ test: clean ## run tests in the current virtualenv pytest format: ## Format code automatically - isort $(SOURCES) black $(BLACK_OPTS) + isort $(SOURCES) diff_cover: test ## find diff lines that need test coverage diff-cover coverage.xml diff --git a/platform_plugin_turnitin/turnitin.py b/platform_plugin_turnitin/turnitin.py index 3fb5f22..2d348f3 100644 --- a/platform_plugin_turnitin/turnitin.py +++ b/platform_plugin_turnitin/turnitin.py @@ -255,7 +255,9 @@ def generate_similarity_report( Returns: dict: The status of the similarity report generation process. """ - payload = getattr(settings, "TURNITIN_SIMILARY_REPORT_PAYLOAD") # pylint: disable=literal-used-as-attribute + payload = getattr( # pylint: disable=literal-used-as-attribute + settings, "TURNITIN_SIMILARY_REPORT_PAYLOAD" + ) current_user = self.get_django_user() try: last_submission = TurnitinSubmission.objects.filter( diff --git a/platform_plugin_turnitin/turnitin_client/handlers/api_handler.py b/platform_plugin_turnitin/turnitin_client/handlers/api_handler.py index c36c9b1..1c6dba4 100644 --- a/platform_plugin_turnitin/turnitin_client/handlers/api_handler.py +++ b/platform_plugin_turnitin/turnitin_client/handlers/api_handler.py @@ -70,8 +70,10 @@ def turnitin_api_handler( headers["Content-Type"] = "binary/octet-stream" headers["Content-Disposition"] = f'inline; filename="{uploaded_file.name}"' response = requests.put( - f"{TII_API_URL}/api/v1/{url_prefix}", headers=headers, data=uploaded_file, - timeout=settings.TURNITIN_API_TIMEOUT + f"{TII_API_URL}/api/v1/{url_prefix}", + headers=headers, + data=uploaded_file, + timeout=settings.TURNITIN_API_TIMEOUT, ) return response