From 1e01e76ac25d9bb064317f6cfce794cda6a95b86 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 12 Dec 2020 18:06:48 -0800 Subject: [PATCH] removes unneeded imports --- bookwyrm/models/author.py | 3 ++- bookwyrm/models/base_model.py | 1 + bookwyrm/models/import_job.py | 1 - bookwyrm/models/relationship.py | 2 +- bookwyrm/status.py | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bookwyrm/models/author.py b/bookwyrm/models/author.py index 79973a37..331d2dd6 100644 --- a/bookwyrm/models/author.py +++ b/bookwyrm/models/author.py @@ -16,7 +16,8 @@ class Author(ActivitypubMixin, BookWyrmModel): max_length=255, blank=True, null=True, deduplication_field=True) sync = models.BooleanField(default=True) last_sync_date = models.DateTimeField(default=timezone.now) - wikipedia_link = fields.CharField(max_length=255, blank=True, null=True, deduplication_field=True) + wikipedia_link = fields.CharField( + max_length=255, blank=True, null=True, deduplication_field=True) # idk probably other keys would be useful here? born = fields.DateTimeField(blank=True, null=True) died = fields.DateTimeField(blank=True, null=True) diff --git a/bookwyrm/models/base_model.py b/bookwyrm/models/base_model.py index f44797ab..dd3065c9 100644 --- a/bookwyrm/models/base_model.py +++ b/bookwyrm/models/base_model.py @@ -44,6 +44,7 @@ class BookWyrmModel(models.Model): @receiver(models.signals.post_save) +#pylint: disable=unused-argument def execute_after_save(sender, instance, created, *args, **kwargs): ''' set the remote_id after save (when the id is available) ''' if not created or not hasattr(instance, 'get_remote_id'): diff --git a/bookwyrm/models/import_job.py b/bookwyrm/models/import_job.py index fe39325f..8b09216f 100644 --- a/bookwyrm/models/import_job.py +++ b/bookwyrm/models/import_job.py @@ -6,7 +6,6 @@ from django.db import models from django.utils import timezone from bookwyrm import books_manager -from bookwyrm.connectors import ConnectorException from bookwyrm.models import ReadThrough, User, Book from bookwyrm.utils.fields import JSONField from .base_model import PrivacyLevels diff --git a/bookwyrm/models/relationship.py b/bookwyrm/models/relationship.py index 8913b9ab..debe2ace 100644 --- a/bookwyrm/models/relationship.py +++ b/bookwyrm/models/relationship.py @@ -37,7 +37,7 @@ class UserRelationship(ActivitypubMixin, BookWyrmModel): activity_serializer = activitypub.Follow - def get_remote_id(self, status=None): + def get_remote_id(self, status=None):# pylint: disable=arguments-differ ''' use shelf identifier in remote_id ''' status = status or 'follows' base_path = self.user_subject.remote_id diff --git a/bookwyrm/status.py b/bookwyrm/status.py index 83a106e5..648f2e7d 100644 --- a/bookwyrm/status.py +++ b/bookwyrm/status.py @@ -1,7 +1,7 @@ ''' Handle user activity ''' from django.utils import timezone -from bookwyrm import activitypub, books_manager, models +from bookwyrm import models from bookwyrm.sanitize_html import InputHtmlParser