refactor: pyupgrade second iteration (#27459)
This commit is contained in:
@@ -15,13 +15,13 @@ from storages.backends.s3boto3 import S3Boto3Storage
|
||||
from openedx.core.djangoapps.theming.storage import ThemeManifestFilesMixin, ThemePipelineMixin, ThemeMixin
|
||||
|
||||
|
||||
class PipelineForgivingMixin(object):
|
||||
class PipelineForgivingMixin:
|
||||
"""
|
||||
An extension of the django-pipeline storage backend which forgives missing files.
|
||||
"""
|
||||
def hashed_name(self, name, content=None, **kwargs): # lint-amnesty, pylint: disable=missing-function-docstring
|
||||
try:
|
||||
out = super(PipelineForgivingMixin, self).hashed_name(name, content, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments
|
||||
out = super().hashed_name(name, content, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments
|
||||
except ValueError:
|
||||
# This means that a file could not be found, and normally this would
|
||||
# cause a fatal error, which seems rather excessive given that
|
||||
@@ -31,7 +31,7 @@ class PipelineForgivingMixin(object):
|
||||
|
||||
def stored_name(self, name): # lint-amnesty, pylint: disable=missing-function-docstring
|
||||
try:
|
||||
out = super(PipelineForgivingMixin, self).stored_name(name) # lint-amnesty, pylint: disable=super-with-arguments
|
||||
out = super().stored_name(name) # lint-amnesty, pylint: disable=super-with-arguments
|
||||
except ValueError:
|
||||
# This means that a file could not be found, and normally this would
|
||||
# cause a fatal error, which seems rather excessive given that
|
||||
@@ -54,7 +54,7 @@ class ProductionMixin(
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs.update(settings.STATICFILES_STORAGE_KWARGS.get(settings.STATICFILES_STORAGE, {}))
|
||||
super(ProductionMixin, self).__init__(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments
|
||||
super().__init__(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments
|
||||
|
||||
|
||||
class ProductionStorage(ProductionMixin, StaticFilesStorage):
|
||||
|
||||
Reference in New Issue
Block a user