From d0bb07df29ff54a0eec7dd4b31a21c78cd534f66 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sat, 4 Mar 2023 17:33:41 -0500 Subject: [PATCH] Fix flake8 issues --- tests/scrobbles_tests/conftest.py | 3 +-- tests/scrobbles_tests/test_views.py | 2 -- vrobbler/cli.py | 5 +---- vrobbler/settings.py | 1 - 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/scrobbles_tests/conftest.py b/tests/scrobbles_tests/conftest.py index 48924a8..c94c000 100644 --- a/tests/scrobbles_tests/conftest.py +++ b/tests/scrobbles_tests/conftest.py @@ -1,7 +1,6 @@ import json import pytest -from scrobbles.models import Scrobble from rest_framework.authtoken.models import Token from django.contrib.auth import get_user_model @@ -19,7 +18,7 @@ class MopidyRequest: musicbrainz_track_id = "54214d63-5adf-4909-87cd-c65c37a6d558" musicbrainz_album_id = "03b864cd-7761-314c-a892-05a89ddff00d" musicbrainz_artist_id = "95f5b748-d370-47fe-85bd-0af2dc450bc0" - mopidy_uri = "local:track:Sublime%20-%20Sublime/Disc%201%20-%2004%20-%20Same%20in%20the%20End.mp3" + mopidy_uri = "local:track:Sublime%20-%20Sublime/Disc%201%20-%2004%20-%20Same%20in%20the%20End.mp3" # noqa status = "resumed" def __init__(self, **kwargs): diff --git a/tests/scrobbles_tests/test_views.py b/tests/scrobbles_tests/test_views.py index 3c28def..ea7fe4c 100644 --- a/tests/scrobbles_tests/test_views.py +++ b/tests/scrobbles_tests/test_views.py @@ -1,5 +1,3 @@ -import json - import pytest from django.urls import reverse from music.models import Track diff --git a/vrobbler/cli.py b/vrobbler/cli.py index f1cdf08..95c5303 100644 --- a/vrobbler/cli.py +++ b/vrobbler/cli.py @@ -4,7 +4,7 @@ import sys from os import environ as env -if not "DJANGO_SETTINGS_MODULE" in env: +if "DJANGO_SETTINGS_MODULE" not in env: from vrobbler import settings env.setdefault("DJANGO_SETTINGS_MODULE", settings.__name__) @@ -19,9 +19,6 @@ logger = logging.getLogger("vrobbler") def main(): - # to get configured settings - from django.conf import settings - try: from django.core.management import execute_from_command_line except ImportError as exc: diff --git a/vrobbler/settings.py b/vrobbler/settings.py index a35d7b0..91c74af 100644 --- a/vrobbler/settings.py +++ b/vrobbler/settings.py @@ -4,7 +4,6 @@ from pathlib import Path import dj_database_url -from django.utils.translation import gettext_lazy as _ from dotenv import load_dotenv PROJECT_ROOT = Path(__file__).resolve().parent