1
0
Fork 0

pylint: enable useless-suppression lint and perform cleanup

This commit is contained in:
Adeodato Simó 2024-07-27 02:36:43 -03:00
parent 81ee5e945f
commit 0b87aacfce
65 changed files with 31 additions and 86 deletions

View file

@ -14,7 +14,6 @@ from bookwyrm.tests.validate_html import validate_html
class ImportUserViews(TestCase):
"""user import views"""
# pylint: disable=invalid-name
def setUp(self):
"""we need basic test data and mocks"""
self.factory = RequestFactory()

View file

@ -11,7 +11,6 @@ from django.test.client import RequestFactory
from bookwyrm import models, views
# pylint: disable=too-many-public-methods
class Inbox(TestCase):
"""readthrough tests"""

View file

@ -7,7 +7,6 @@ import responses
from bookwyrm import models, views
# pylint: disable=too-many-public-methods
class InboxAdd(TestCase):
"""inbox tests"""

View file

@ -7,7 +7,6 @@ import responses
from bookwyrm import models, views
# pylint: disable=too-many-public-methods
class InboxActivities(TestCase):
"""inbox tests"""

View file

@ -6,7 +6,6 @@ from django.test import TestCase
from bookwyrm import models, views
# pylint: disable=too-many-public-methods
class InboxBlock(TestCase):
"""inbox tests"""

View file

@ -9,7 +9,6 @@ from bookwyrm import models, views
from bookwyrm.activitypub import ActivitySerializerError
# pylint: disable=too-many-public-methods
class TransactionInboxCreate(TransactionTestCase):
"""readthrough tests"""

View file

@ -7,7 +7,6 @@ from django.test import TestCase
from bookwyrm import models, views
# pylint: disable=too-many-public-methods
class InboxActivities(TestCase):
"""inbox tests"""

View file

@ -7,7 +7,6 @@ from django.test import TestCase
from bookwyrm import models, views
# pylint: disable=too-many-public-methods
class InboxRelationships(TestCase):
"""inbox tests"""

View file

@ -6,7 +6,6 @@ from django.test import TestCase
from bookwyrm import models, views
# pylint: disable=too-many-public-methods
class InboxActivities(TestCase):
"""inbox tests"""

View file

@ -6,7 +6,6 @@ from django.test import TestCase
from bookwyrm import models, views
# pylint: disable=too-many-public-methods
class InboxRemove(TestCase):
"""inbox tests"""

View file

@ -8,7 +8,6 @@ from django.test import TestCase
from bookwyrm import models, views
# pylint: disable=too-many-public-methods
class InboxUpdate(TestCase):
"""inbox tests"""
@ -161,7 +160,6 @@ class InboxUpdate(TestCase):
datafile = pathlib.Path(__file__).parent.joinpath("../../data/bw_edition.json")
bookdata = json.loads(datafile.read_bytes())
del bookdata["authors"]
# pylint: disable=line-too-long
link_data = {
"href": "https://openlibrary.org/books/OL11645413M/Queen_Victoria/daisy",
"mediaType": "Daisy",

View file

@ -11,7 +11,6 @@ from bookwyrm import forms, models, views
from bookwyrm.tests.validate_html import validate_html
# pylint: disable=too-many-public-methods
@patch("bookwyrm.suggested_users.rerank_suggestions_task.delay")
@patch("bookwyrm.activitystreams.populate_stream_task.delay")
class LoginViews(TestCase):

View file

@ -11,7 +11,6 @@ from bookwyrm import models, views
from bookwyrm.tests.validate_html import validate_html
# pylint: disable=unused-argument
class ListViews(TestCase):
"""list view"""

View file

@ -11,7 +11,6 @@ from bookwyrm import models, views
from bookwyrm.tests.validate_html import validate_html
# pylint: disable=unused-argument
class ListViews(TestCase):
"""list view"""

View file

@ -13,7 +13,6 @@ from bookwyrm.activitypub import ActivitypubResponse
from bookwyrm.tests.validate_html import validate_html
# pylint: disable=unused-argument
# pylint: disable=too-many-public-methods
class ListViews(TestCase):
"""list view"""

View file

@ -7,8 +7,6 @@ from django.test.client import RequestFactory
from bookwyrm import models, views
# pylint: disable=unused-argument
# pylint: disable=too-many-public-methods
class ListItemViews(TestCase):
"""list view"""

View file

@ -11,7 +11,7 @@ from django.test.client import RequestFactory
from bookwyrm import models, views
from bookwyrm.tests.validate_html import validate_html
# pylint: disable=unused-argument
class ListViews(TestCase):
"""lists of lists"""

View file

@ -18,7 +18,7 @@ class ExportViews(TestCase):
"""viewing and creating statuses"""
@classmethod
def setUpTestData(cls): # pylint: disable=invalid-name
def setUpTestData(cls):
"""we need basic test data and mocks"""
with (
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"),
@ -41,7 +41,6 @@ class ExportViews(TestCase):
bnf_id="beep",
)
# pylint: disable=invalid-name
def setUp(self):
"""individual test setup"""
self.factory = RequestFactory()

View file

@ -11,7 +11,7 @@ from django.test.client import RequestFactory
from bookwyrm import forms, models, views
# pylint: disable=too-many-public-methods
@patch("bookwyrm.suggested_users.rerank_suggestions_task.delay")
@patch("bookwyrm.activitystreams.populate_stream_task.delay")
class TwoFactorViews(TestCase):

View file

@ -9,7 +9,7 @@ from django.test.client import RequestFactory
from bookwyrm import models, views
from bookwyrm.tests.validate_html import validate_html
# pylint: disable=unused-argument
class DirectoryViews(TestCase):
"""tag views"""

View file

@ -10,7 +10,6 @@ from bookwyrm import models, views
from bookwyrm.settings import USER_AGENT
# pylint: disable=too-many-public-methods
@patch("bookwyrm.models.activitypub_mixin.broadcast_task.apply_async")
class OutboxView(TestCase):
"""sends out activities"""