Fix ruff errors
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/tests Pipeline was successful

This commit is contained in:
Sonny Bakker 2025-03-23 21:05:01 +01:00
parent 3160becb72
commit 1574661c57
9 changed files with 38 additions and 36 deletions

View file

@ -13,9 +13,9 @@ from newsreader.accounts.views.password import (
PasswordResetDoneView,
PasswordResetView,
)
from newsreader.accounts.views.settings import SettingsView
__all__ = [
"LoginView",
"LogoutView",

View file

@ -1,10 +1,9 @@
import os
from .base import * # noqa: F403
from .version import get_current_version
from .base import * # noqa: F403
DEBUG = False
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")

View file

@ -1,4 +1,5 @@
from django.db.models import Prefetch
from rest_framework import status
from rest_framework.generics import (
GenericAPIView,

View file

@ -2,6 +2,7 @@ from newsreader.news.collection.forms.feed import FeedForm, OPMLImportForm
from newsreader.news.collection.forms.reddit import SubRedditForm
from newsreader.news.collection.forms.rules import CollectionRuleBulkForm
__all__ = [
"FeedForm",
"OPMLImportForm",

View file

@ -1,5 +1,5 @@
from django.db import models
from django.conf import settings
from django.db import models
from django.urls import reverse
from django.utils.translation import gettext as _

View file

@ -5,12 +5,12 @@ from django.test import TestCase
from newsreader.news.collection.favicon import FaviconBuilder
from newsreader.news.collection.tests.factories import CollectionRuleFactory
from newsreader.news.collection.tests.favicon.builder.mocks import (
simple_mock,
mock_without_url,
mock_without_header,
mock_with_weird_path,
mock_with_other_url,
mock_with_multiple_icons,
mock_with_other_url,
mock_with_weird_path,
mock_without_header,
mock_without_url,
simple_mock,
)

View file

@ -11,21 +11,21 @@ from newsreader.news.core.models import Post
from newsreader.news.core.tests.factories import FeedPostFactory
from .mocks import (
multiple_mock,
mock_with_html,
mock_with_long_author,
mock_with_long_exotic_title,
mock_with_long_title,
mock_with_longer_content_detail,
mock_with_multiple_content_detail,
mock_with_shorter_content_detail,
mock_with_update_entries,
mock_without_author,
mock_without_body,
mock_without_entries,
mock_without_identifier,
mock_without_publish_date,
mock_without_url,
mock_without_body,
mock_without_author,
mock_without_entries,
mock_with_update_entries,
mock_with_html,
mock_with_long_author,
mock_with_long_title,
mock_with_long_exotic_title,
mock_with_longer_content_detail,
mock_with_shorter_content_detail,
mock_with_multiple_content_detail,
multiple_mock,
)

View file

@ -6,24 +6,24 @@ from django.test import TestCase
from newsreader.news.collection.reddit import RedditBuilder
from newsreader.news.collection.tests.factories import SubredditFactory
from newsreader.news.collection.tests.reddit.builder.mocks import (
simple_mock,
empty_mock,
unknown_mock,
unsanitized_mock,
author_mock,
title_mock,
duplicate_mock,
image_mock,
external_image_mock,
video_mock,
external_video_mock,
external_gifv_mock,
nsfw_mock,
spoiler_mock,
seen_mock,
upvote_mock,
comment_mock,
downvote_mock,
duplicate_mock,
empty_mock,
external_gifv_mock,
external_image_mock,
external_video_mock,
image_mock,
nsfw_mock,
seen_mock,
simple_mock,
spoiler_mock,
title_mock,
unknown_mock,
unsanitized_mock,
upvote_mock,
video_mock,
)
from newsreader.news.core.models import Post
from newsreader.news.core.tests.factories import RedditPostFactory

View file

@ -1,4 +1,5 @@
from django.db.models import Prefetch
from rest_framework import status
from rest_framework.generics import (
GenericAPIView,