Apply ruff formatting

This commit is contained in:
Sonny Bakker 2024-10-06 20:47:57 +02:00
parent 99c232fea2
commit 16ebf3bdb3
6 changed files with 5 additions and 18 deletions

View file

@ -1,11 +1,10 @@
from unittest.mock import Mock, patch
from unittest.mock import patch
from urllib.parse import urlencode
from uuid import uuid4
from django.core.cache import cache
from django.test import TestCase
from django.urls import reverse
from django.utils.translation import gettext as _
from bs4 import BeautifulSoup

View file

@ -239,7 +239,6 @@ REST_FRAMEWORK = {
"DEFAULT_RENDERER_CLASSES": (
"djangorestframework_camel_case.render.CamelCaseJSONRenderer",
),
"DEFAULT_PARSER_CLASSES": (
"djangorestframework_camel_case.parser.CamelCaseJSONParser",
),

View file

@ -1,5 +1,4 @@
from django import forms
from django.utils.translation import gettext_lazy as _
from newsreader.core.forms import CheckboxInput
from newsreader.news.collection.forms.base import CollectionRuleForm

View file

@ -1,6 +1,6 @@
import json
from datetime import date, datetime, time, timezone
from datetime import datetime, timezone
from django.test import TestCase
from django.urls import reverse

View file

@ -10,11 +10,7 @@ from newsreader.news.collection.views.base import CollectionRuleViewMixin
from newsreader.utils.views import NavListMixin
class CollectionRuleListView(
CollectionRuleViewMixin,
NavListMixin,
ListView
):
class CollectionRuleListView(CollectionRuleViewMixin, NavListMixin, ListView):
paginate_by = 50
template_name = "news/collection/views/rules.html"
context_object_name = "rules"

View file

@ -25,12 +25,6 @@ class NavListMixin(ContextMixin):
}
if self.request.user.is_authenticated:
return {
**context_data,
"sidebar_links": authenticated_links
}
return {**context_data, "sidebar_links": authenticated_links}
return {
**context_data,
"sidebar_links": unauthenticated_links
}
return {**context_data, "sidebar_links": unauthenticated_links}