From 9396a46e35ad0aa8fe11bf1a63c11fe8991dee86 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 21:57:51 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- sandbox/conf/base.py | 1 + sandbox/urls.py | 1 + src/posts/views/post_views.py | 1 - src/profiles/admin.py | 8 +++++--- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sandbox/conf/base.py b/sandbox/conf/base.py index 07d065a..db7fd77 100644 --- a/sandbox/conf/base.py +++ b/sandbox/conf/base.py @@ -1,6 +1,7 @@ """ django 4.2.1 """ + from pathlib import Path import environ diff --git a/sandbox/urls.py b/sandbox/urls.py index d374cc3..789063a 100644 --- a/sandbox/urls.py +++ b/sandbox/urls.py @@ -1,4 +1,5 @@ """config URL Configuration 4.1""" + from django.conf import settings from django.conf.urls.i18n import i18n_patterns from django.conf.urls.static import static diff --git a/src/posts/views/post_views.py b/src/posts/views/post_views.py index 1343356..d916b90 100644 --- a/src/posts/views/post_views.py +++ b/src/posts/views/post_views.py @@ -17,7 +17,6 @@ class PostList(PostListMenuMixin, ListView): - """display only public posts""" template_name = "posts/post_list.html" diff --git a/src/profiles/admin.py b/src/profiles/admin.py index 0937617..40a5140 100644 --- a/src/profiles/admin.py +++ b/src/profiles/admin.py @@ -88,9 +88,11 @@ def changelist_view(self, request, extra_context=None): { "period": x["period"], "sub_total": x["sub_total"] or 0, - "pct": ((x["sub_total"] or 0) - low) / (high - low) * 100 - if high > low - else 0, + "pct": ( + ((x["sub_total"] or 0) - low) / (high - low) * 100 + if high > low + else 0 + ), } for x in calc_qs ]