Skip to content

Commit

Permalink
Fixing pylint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Torrey <jacob@jacobtorrey.com>
  • Loading branch information
ranok committed Apr 4, 2023
1 parent 797d339 commit f9c75a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions bookwyrm/connectors/abstract_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
import imghdr
import logging
import re
import aiohttp
import asyncio
import requests
from requests.exceptions import RequestException
import aiohttp

from django.core.files.base import ContentFile
from django.db import transaction
import requests
from requests.exceptions import RequestException

from bookwyrm import activitypub, models, settings
from bookwyrm.settings import SEARCH_TIMEOUT, USER_AGENT
from bookwyrm.settings import USER_AGENT
from .connector_manager import load_more_data, ConnectorException, raise_not_valid_url
from .format_mappings import format_mappings

Expand Down Expand Up @@ -75,13 +75,13 @@ async def get_results(self, session, url, min_confidence, query):
if not response.ok:
logger.info("Unable to connect to %s: %s", url, response.reason)
return

try:
raw_data = await response.json()
except aiohttp.client_exceptions.ContentTypeError as err:
logger.exception(err)
return

return {
"connector": self,
"results": self.process_search_response(
Expand All @@ -93,7 +93,7 @@ async def get_results(self, session, url, min_confidence, query):
except aiohttp.ClientError as err:
logger.info(err)


@abstractmethod
def get_or_create_book(self, remote_id):
"""pull up a book record by whatever means possible"""
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/connectors/connector_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from requests import HTTPError

from bookwyrm import book_search, models
from bookwyrm.settings import SEARCH_TIMEOUT, USER_AGENT
from bookwyrm.settings import SEARCH_TIMEOUT
from bookwyrm.tasks import app, LOW

logger = logging.getLogger(__name__)
Expand Down

0 comments on commit f9c75a4

Please sign in to comment.