diff options
| author | chillaranand <anand21nanda@gmail.com> | 2017-01-21 18:43:44 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-01-25 12:23:46 -0500 |
| commit | d6eaf7c0183cd04b78f2a55e1d60bb7e59598310 (patch) | |
| tree | ab02fd9949d4bfa23e27dea45e213ce334c883f0 /django/contrib/staticfiles/storage.py | |
| parent | dc165ec8e5698ffc6dee6b510f1f92c9fd7467fe (diff) | |
Refs #23919 -- Replaced super(ClassName, self) with super().
Diffstat (limited to 'django/contrib/staticfiles/storage.py')
| -rw-r--r-- | django/contrib/staticfiles/storage.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/django/contrib/staticfiles/storage.py b/django/contrib/staticfiles/storage.py index 46b751b094..6648d2c705 100644 --- a/django/contrib/staticfiles/storage.py +++ b/django/contrib/staticfiles/storage.py @@ -31,8 +31,7 @@ class StaticFilesStorage(FileSystemStorage): if base_url is None: base_url = settings.STATIC_URL check_settings(base_url) - super(StaticFilesStorage, self).__init__(location, base_url, - *args, **kwargs) + super().__init__(location, base_url, *args, **kwargs) # FileSystemStorage fallbacks to MEDIA_ROOT when location # is empty, so we restore the empty value. if not location: @@ -44,7 +43,7 @@ class StaticFilesStorage(FileSystemStorage): raise ImproperlyConfigured("You're using the staticfiles app " "without having set the STATIC_ROOT " "setting to a filesystem path.") - return super(StaticFilesStorage, self).path(name) + return super().path(name) class HashedFilesMixin: @@ -58,7 +57,7 @@ class HashedFilesMixin: ) def __init__(self, *args, **kwargs): - super(HashedFilesMixin, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self._patterns = OrderedDict() self.hashed_files = {} for extension, patterns in self.patterns: @@ -134,7 +133,7 @@ class HashedFilesMixin: args += (hashed_files,) hashed_name = hashed_name_func(*args) - final_url = super(HashedFilesMixin, self).url(hashed_name) + final_url = super().url(hashed_name) # Special casing for a @font-face hack, like url(myfont.eot?#iefix") # http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax @@ -376,7 +375,7 @@ class ManifestFilesMixin(HashedFilesMixin): manifest_strict = True def __init__(self, *args, **kwargs): - super(ManifestFilesMixin, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.hashed_files = self.load_manifest() def read_manifest(self): @@ -403,8 +402,7 @@ class ManifestFilesMixin(HashedFilesMixin): def post_process(self, *args, **kwargs): self.hashed_files = OrderedDict() - all_post_processed = super(ManifestFilesMixin, - self).post_process(*args, **kwargs) + all_post_processed = super().post_process(*args, **kwargs) for post_processed in all_post_processed: yield post_processed self.save_manifest() @@ -465,7 +463,7 @@ class _MappingCache: class CachedFilesMixin(HashedFilesMixin): def __init__(self, *args, **kwargs): - super(CachedFilesMixin, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) try: self.hashed_files = _MappingCache(caches['staticfiles']) except InvalidCacheBackendError: |
