From f6b7eac960f31db590ed0772eb9f53008960d37d Mon Sep 17 00:00:00 2001 From: Esteban Giraldo Date: Mon, 18 Nov 2024 13:50:17 -0500 Subject: [PATCH] fix: typos and linting --- docs/001-custom-features.md | 6 +++--- edx_sga/tests/test_utils.py | 4 ++-- edx_sga/utils.py | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/001-custom-features.md b/docs/001-custom-features.md index 2440941f..7cc561a4 100644 --- a/docs/001-custom-features.md +++ b/docs/001-custom-features.md @@ -42,8 +42,8 @@ platform settings. For our fork, this feature adds the capability to define a si ### Feature -To define a d backend shall follow the following format by defining the storage class and its kwargs. -As an example, below you will be find de Site Configuration definition to use an AWS S3 bucket: +To define a desire backend, follow the following format by defining the storage class and its kwargs. +As an example, below you will find the Site Configuration definition to use an AWS S3 bucket: "SGA_STORAGE_SETTINGS": { "STORAGE_CLASS": "storages.backends.s3boto3.S3Boto3Storage", @@ -56,4 +56,4 @@ As an example, below you will be find de Site Configuration definition to use an } Once it has been done, the SGA xblocks for the given site will manage the media objects with the defined storage backend. -If no settings are defined, the Xblock will use the default Django storage +If no settings are defined, the Xblock would use the default Django storage. diff --git a/edx_sga/tests/test_utils.py b/edx_sga/tests/test_utils.py index b72dcece..4b476a31 100644 --- a/edx_sga/tests/test_utils.py +++ b/edx_sga/tests/test_utils.py @@ -48,7 +48,7 @@ def test_get_default_storage_with_settings_override(mock_configuration_helpers): "access_key": "test_key", "secret_key": "test_secret", "bucket_name": "test-bucket-1", - "region_name": "us-east-1" + "region_name": "us-east-1", } } }, @@ -63,6 +63,6 @@ def test_get_default_storage_without_settings_override(mock_configuration_helper """ get_default_storage should return default_storage object """ - mock_configuration_helpers.return_value.get_value.return_value = ({}) + mock_configuration_helpers.return_value.get_value.return_value = {} storage = get_default_storage() assert storage == default_storage diff --git a/edx_sga/utils.py b/edx_sga/utils.py index 1b3dee84..8fc11901 100644 --- a/edx_sga/utils.py +++ b/edx_sga/utils.py @@ -28,7 +28,6 @@ def get_default_storage(): sga_storage_settings = configuration_helpers.get_value('SGA_STORAGE_SETTINGS', None) if sga_storage_settings: - sga_storage_settings['STORAGE_KWARGS'] return get_storage_class( sga_storage_settings['STORAGE_CLASS'] )(**sga_storage_settings['STORAGE_KWARGS'])