From 70af678fe3e3c87150141de2fdc9566ace3b716a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 20:04:06 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../commands/send_pending_approval_email.py | 1 + docs/management/commands/update_docs.py | 1 + legacy/urls.py | 1 + members/forms.py | 22 ++++++++++--------- svntogit/urls.py | 1 + tracdb/db_router.py | 1 + tracdb/models.py | 1 + tracdb/stats.py | 1 + 8 files changed, 19 insertions(+), 10 deletions(-) diff --git a/aggregator/management/commands/send_pending_approval_email.py b/aggregator/management/commands/send_pending_approval_email.py index 2f2f6dfe5..188e1304a 100644 --- a/aggregator/management/commands/send_pending_approval_email.py +++ b/aggregator/management/commands/send_pending_approval_email.py @@ -2,6 +2,7 @@ Send an email to settings.FEED_APPROVERS with the feeds that need to be manually approved. """ + from django.conf import settings from django.contrib.auth.models import User from django.core import mail diff --git a/docs/management/commands/update_docs.py b/docs/management/commands/update_docs.py index 335b3b3a3..b3fcb4be5 100644 --- a/docs/management/commands/update_docs.py +++ b/docs/management/commands/update_docs.py @@ -2,6 +2,7 @@ Update and build the documentation into files for display with the djangodocs app. """ + import json import os import shutil diff --git a/legacy/urls.py b/legacy/urls.py index 6c81d1b2c..37c5d3800 100644 --- a/legacy/urls.py +++ b/legacy/urls.py @@ -1,6 +1,7 @@ """ Legacy URLs for documentation pages. """ + from functools import partial from django.urls import path diff --git a/members/forms.py b/members/forms.py index 8be7c5d78..46305dd41 100644 --- a/members/forms.py +++ b/members/forms.py @@ -35,16 +35,16 @@ def __init__(self, *args, **kwargs): self.fields["billing_name"].widget.attrs[ "placeholder" ] = "Billing name (If different from above name)." - self.fields[ - "billing_name" - ].help_text = "For example, this might be your full registered company name." + self.fields["billing_name"].help_text = ( + "For example, this might be your full registered company name." + ) self.fields["display_name"].widget.attrs[ "placeholder" ] = "Your organization's name as you'd like it to appear on our website." self.fields["address"].widget.attrs["placeholder"] = "Mailing address" - self.fields[ - "address" - ].help_text = "We can send the invoice by email, but we need a contact address." + self.fields["address"].help_text = ( + "We can send the invoice by email, but we need a contact address." + ) self.fields["description"].widget.attrs["placeholder"] = ( "A short paragraph that describes your organization and its " "activities, written as if the DSF were describing your company " @@ -104,10 +104,12 @@ def save(self, *args, **kwargs): "Thanks for %s a corporate member of the Django Software Foundation! %s" % ( "renewing as" if is_renewing else "applying to be", - "Your renewal is received, and we'll follow up with an invoice soon." - if is_renewing - else "Your application is being reviewed, and we'll follow up a " - "response from the board after our next monthly meeting.", + ( + "Your renewal is received, and we'll follow up with an invoice soon." + if is_renewing + else "Your application is being reviewed, and we'll follow up a " + "response from the board after our next monthly meeting." + ), ), settings.FUNDRAISING_DEFAULT_FROM_EMAIL, [ diff --git a/svntogit/urls.py b/svntogit/urls.py index a86b38e5f..40a1a0689 100644 --- a/svntogit/urls.py +++ b/svntogit/urls.py @@ -1,6 +1,7 @@ """ Legacy URLs for changesets. """ + from django.urls import path from .views import redirect_to_github diff --git a/tracdb/db_router.py b/tracdb/db_router.py index 2cb5c6279..bd82cb2ff 100644 --- a/tracdb/db_router.py +++ b/tracdb/db_router.py @@ -5,6 +5,7 @@ It's very simplistic, leaving off allow_relation and allow_migrate since all the Trac apps are unmanaged. """ + THIS_APP = "tracdb" diff --git a/tracdb/models.py b/tracdb/models.py index 9958a548a..50c474000 100644 --- a/tracdb/models.py +++ b/tracdb/models.py @@ -43,6 +43,7 @@ * NodeChange: Ditto. """ + import datetime from django.db import models diff --git a/tracdb/stats.py b/tracdb/stats.py index 297146d2e..51a837c1d 100644 --- a/tracdb/stats.py +++ b/tracdb/stats.py @@ -1,6 +1,7 @@ """ Various queries for grabbing interesting user stats from Trac. """ + import operator from collections import OrderedDict