[geany/www.geany.org] 27f860: Remove obsolete arguments from super() calls

Enrico Tröger git-noreply at xxxxx
Sun Aug 23 14:56:29 UTC 2020


Branch:      refs/heads/master
Author:      Enrico Tröger <enrico.troeger at uvena.de>
Committer:   Enrico Tröger <enrico.troeger at uvena.de>
Date:        Sun, 23 Aug 2020 14:56:29 UTC
Commit:      27f8608b4705fe669529e30003b1c93cebf29c5a
             https://github.com/geany/www.geany.org/commit/27f8608b4705fe669529e30003b1c93cebf29c5a

Log Message:
-----------
Remove obsolete arguments from super() calls


Modified Paths:
--------------
    geany/sitemaps.py
    latest_version/models.py
    news/models.py
    news/views.py
    pastebin/forms.py
    pastebin/models.py
    pastebin/views.py
    static_docs/views.py

Modified: geany/sitemaps.py
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -43,7 +43,7 @@ class GeanyMainSitemap(DisplayableSitemap):
 
     # ----------------------------------------------------------------------
     def items(self):
-        items = super(GeanyMainSitemap, self).items()
+        items = super().items()
         additional_app_items = self._get_additional_app_items()
         items.extend(additional_app_items)
         return items
@@ -144,7 +144,7 @@ def location(self, obj):  # pylint: disable=unused-argument
     # ----------------------------------------------------------------------
     def get_urls(self, page=1, site=None, protocol=None):
         # pass our site to the parent as we know better which site we are on
-        return super(StaticSitemap, self).get_urls(page, self._site, protocol)
+        return super().get_urls(page, self._site, protocol)
 
 
 class SitemapRegistry:


Modified: latest_version/models.py
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -32,7 +32,7 @@ class Meta:
     def save(self, *args, **kwargs):  # pylint: disable=signature-differs
         """Save but replace the existing row instead of adding a new one"""
         self.id = 1  # pylint: disable=invalid-name,attribute-defined-outside-init
-        super(LatestVersion, self).save(*args, **kwargs)
+        super().save(*args, **kwargs)
 
     # ----------------------------------------------------------------------
     def delete(self, using=None, keep_parents=False):


Modified: news/models.py
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -88,7 +88,7 @@ class Meta:
     def save(self, *args, **kwargs):  # pylint: disable=signature-differs
         if not self.slug:
             self.slug = slugify(self.title)
-        super(NewsPost, self).save(*args, **kwargs)
+        super().save(*args, **kwargs)
 
     # ----------------------------------------------------------------------
     def get_absolute_url(self):


Modified: news/views.py
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -46,7 +46,7 @@ class NewsDetailView(NewsPostPublishedMixin, View):
     # ----------------------------------------------------------------------
     @method_decorator(csrf_exempt)
     def dispatch(self, request, *args, **kwargs):
-        return super(NewsDetailView, self).dispatch(request, *args, **kwargs)
+        return super().dispatch(request, *args, **kwargs)
 
     # ----------------------------------------------------------------------
     def get(self, request, newspost_slug):


Modified: pastebin/forms.py
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -92,7 +92,7 @@ def save(self, *args, **kwargs):  # pylint: disable=signature-differs
             timedelta(seconds=int(self.cleaned_data['expire_options']))
 
         # Save snippet in the db
-        super(SnippetForm, self).save(self, *args, **kwargs)
+        super().save(self, *args, **kwargs)
 
         # Add snippet to the user's session
         if not self.request.session.get('snippet_list', False):


Modified: pastebin/models.py
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -107,13 +107,13 @@ def save(self, *args, **kwargs):  # pylint: disable=signature-differs
             self.published = timezone.now()
 
         self.content_highlighted = self.content
-        super(Snippet, self).save(*args, **kwargs)
+        super().save(*args, **kwargs)
         # invalidate cache
         cache.delete_many([CACHE_KEY_SNIPPET_LIST_NO_CONTENT, CACHE_KEY_SNIPPET_LIST_FULL])
 
     # ----------------------------------------------------------------------
     def delete(self, *args, **kwargs):  # pylint: disable=signature-differs
-        super(Snippet, self).delete(*args, **kwargs)
+        super().delete(*args, **kwargs)
         # invalidate cache
         cache.delete_many([CACHE_KEY_SNIPPET_LIST_NO_CONTENT, CACHE_KEY_SNIPPET_LIST_FULL])
 


Modified: pastebin/views.py
10 lines changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -62,7 +62,7 @@ class SnippetNewView(View):
     # ----------------------------------------------------------------------
     @method_decorator(check_honeypot)
     def dispatch(self, request, *args, **kwargs):
-        return super(SnippetNewView, self).dispatch(request, *args, **kwargs)
+        return super().dispatch(request, *args, **kwargs)
 
     # ----------------------------------------------------------------------
     def get(self, request):
@@ -95,7 +95,7 @@ class SnippetDetailView(View):
     # ----------------------------------------------------------------------
     @method_decorator(check_honeypot)
     def dispatch(self, request, *args, **kwargs):
-        return super(SnippetDetailView, self).dispatch(request, *args, **kwargs)
+        return super().dispatch(request, *args, **kwargs)
 
     # ----------------------------------------------------------------------
     def get(self, request, snippet_id):
@@ -139,7 +139,7 @@ class SnippetDetailRawView(SnippetDetailView):
 
     # ----------------------------------------------------------------------
     def get(self, request, snippet_id):
-        response = super(SnippetDetailRawView, self).get(request, snippet_id)
+        response = super().get(request, snippet_id)
         # set content type
         response['Content-Type'] = 'text/plain;charset=UTF-8'
         return response
@@ -178,7 +178,7 @@ class LatestSnippetsView(TemplateView):
     def get_context_data(self, **kwargs):
         snippet_list_ = _get_snippet_list()
 
-        context = super(LatestSnippetsView, self).get_context_data(**kwargs)
+        context = super().get_context_data(**kwargs)
         context['snippets_max'] = getattr(settings, 'MAX_SNIPPETS_PER_USER', 10)
         context['snippet_list'] = snippet_list_
         return context
@@ -189,7 +189,7 @@ class SnippetAPIView(View):
     # ----------------------------------------------------------------------
     @method_decorator(csrf_exempt)
     def dispatch(self, request, *args, **kwargs):
-        return super(SnippetAPIView, self).dispatch(request, *args, **kwargs)
+        return super().dispatch(request, *args, **kwargs)
 
     # ----------------------------------------------------------------------
     def post(self, request):


Modified: static_docs/views.py
10 lines changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -56,7 +56,7 @@ class StaticDocsView(TemplateView):
 
     # ----------------------------------------------------------------------
     def __init__(self, *args, **kwargs):
-        super(StaticDocsView, self).__init__(*args, **kwargs)
+        super().__init__(*args, **kwargs)
         self._file_contents = None
 
     # ----------------------------------------------------------------------
@@ -80,7 +80,7 @@ def get_context_data(self, **kwargs):
         version = kwargs.get('version', None)
         release = self._get_release_notes_for_version(releases, version=version)
 
-        context = super(ReleaseNotesView, self).get_context_data(**kwargs)
+        context = super().get_context_data(**kwargs)
         context['selected_release'] = release
         context['releases'] = releases
         return context
@@ -207,7 +207,7 @@ class ToDoView(StaticDocsView):
     # ----------------------------------------------------------------------
     def get_context_data(self, **kwargs):
         todo = self._get_todo()
-        context = super(ToDoView, self).get_context_data(**kwargs)
+        context = super().get_context_data(**kwargs)
         context['todo'] = todo
         return context
 
@@ -229,7 +229,7 @@ class I18NStatisticsView(TemplateView):
     # ----------------------------------------------------------------------
     def get_context_data(self, **kwargs):
         i18n_statistics = self._get_i18n_statistics()
-        context = super(I18NStatisticsView, self).get_context_data(**kwargs)
+        context = super().get_context_data(**kwargs)
         context['i18n_statistics'] = i18n_statistics
         context['generated_datetime'] = datetime.utcfromtimestamp(
             i18n_statistics['generated_timestamp'])
@@ -256,7 +256,7 @@ class ThemesView(StaticDocsView):
     # ----------------------------------------------------------------------
     def get_context_data(self, **kwargs):
         theme_index = self._get_theme_index()
-        context = super(ThemesView, self).get_context_data(**kwargs)
+        context = super().get_context_data(**kwargs)
         context['theme_index'] = theme_index
         return context
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list