Apply ruff formatting
This commit is contained in:
parent
99c232fea2
commit
16ebf3bdb3
6 changed files with 5 additions and 18 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -239,7 +239,6 @@ REST_FRAMEWORK = {
|
|||
"DEFAULT_RENDERER_CLASSES": (
|
||||
"djangorestframework_camel_case.render.CamelCaseJSONRenderer",
|
||||
),
|
||||
|
||||
"DEFAULT_PARSER_CLASSES": (
|
||||
"djangorestframework_camel_case.parser.CamelCaseJSONParser",
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue