Fix ruff errors
This commit is contained in:
parent
3160becb72
commit
1574661c57
9 changed files with 38 additions and 36 deletions
|
|
@ -13,9 +13,9 @@ from newsreader.accounts.views.password import (
|
||||||
PasswordResetDoneView,
|
PasswordResetDoneView,
|
||||||
PasswordResetView,
|
PasswordResetView,
|
||||||
)
|
)
|
||||||
|
|
||||||
from newsreader.accounts.views.settings import SettingsView
|
from newsreader.accounts.views.settings import SettingsView
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"LoginView",
|
"LoginView",
|
||||||
"LogoutView",
|
"LogoutView",
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from .base import * # noqa: F403
|
||||||
from .version import get_current_version
|
from .version import get_current_version
|
||||||
|
|
||||||
|
|
||||||
from .base import * # noqa: F403
|
|
||||||
|
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
||||||
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
from django.db.models import Prefetch
|
from django.db.models import Prefetch
|
||||||
|
|
||||||
from rest_framework import status
|
from rest_framework import status
|
||||||
from rest_framework.generics import (
|
from rest_framework.generics import (
|
||||||
GenericAPIView,
|
GenericAPIView,
|
||||||
|
|
|
||||||
|
|
@ -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.reddit import SubRedditForm
|
||||||
from newsreader.news.collection.forms.rules import CollectionRuleBulkForm
|
from newsreader.news.collection.forms.rules import CollectionRuleBulkForm
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"FeedForm",
|
"FeedForm",
|
||||||
"OPMLImportForm",
|
"OPMLImportForm",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from django.db import models
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.db import models
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@ from django.test import TestCase
|
||||||
from newsreader.news.collection.favicon import FaviconBuilder
|
from newsreader.news.collection.favicon import FaviconBuilder
|
||||||
from newsreader.news.collection.tests.factories import CollectionRuleFactory
|
from newsreader.news.collection.tests.factories import CollectionRuleFactory
|
||||||
from newsreader.news.collection.tests.favicon.builder.mocks import (
|
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_multiple_icons,
|
||||||
|
mock_with_other_url,
|
||||||
|
mock_with_weird_path,
|
||||||
|
mock_without_header,
|
||||||
|
mock_without_url,
|
||||||
|
simple_mock,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,21 +11,21 @@ from newsreader.news.core.models import Post
|
||||||
from newsreader.news.core.tests.factories import FeedPostFactory
|
from newsreader.news.core.tests.factories import FeedPostFactory
|
||||||
|
|
||||||
from .mocks import (
|
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_identifier,
|
||||||
mock_without_publish_date,
|
mock_without_publish_date,
|
||||||
mock_without_url,
|
mock_without_url,
|
||||||
mock_without_body,
|
multiple_mock,
|
||||||
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,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,24 +6,24 @@ from django.test import TestCase
|
||||||
from newsreader.news.collection.reddit import RedditBuilder
|
from newsreader.news.collection.reddit import RedditBuilder
|
||||||
from newsreader.news.collection.tests.factories import SubredditFactory
|
from newsreader.news.collection.tests.factories import SubredditFactory
|
||||||
from newsreader.news.collection.tests.reddit.builder.mocks import (
|
from newsreader.news.collection.tests.reddit.builder.mocks import (
|
||||||
simple_mock,
|
|
||||||
empty_mock,
|
|
||||||
unknown_mock,
|
|
||||||
unsanitized_mock,
|
|
||||||
author_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,
|
comment_mock,
|
||||||
downvote_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.models import Post
|
||||||
from newsreader.news.core.tests.factories import RedditPostFactory
|
from newsreader.news.core.tests.factories import RedditPostFactory
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
from django.db.models import Prefetch
|
from django.db.models import Prefetch
|
||||||
|
|
||||||
from rest_framework import status
|
from rest_framework import status
|
||||||
from rest_framework.generics import (
|
from rest_framework.generics import (
|
||||||
GenericAPIView,
|
GenericAPIView,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue