Skip to content

Commit

Permalink
fix: typos and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekenhei committed Nov 18, 2024
1 parent 33288c0 commit f6b7eac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/001-custom-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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.
4 changes: 2 additions & 2 deletions edx_sga/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
}
},
Expand All @@ -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
1 change: 0 additions & 1 deletion edx_sga/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down

0 comments on commit f6b7eac

Please sign in to comment.