fix all pylint complaints

This commit is contained in:
Daan Sprenkels
2019-01-21 22:26:43 +01:00
parent 2c41e85753
commit 19c1c70cd3
28 changed files with 85 additions and 119 deletions

View File

@ -1,7 +1,5 @@
import time
from django.db import models
from django.db.models import Q, Max
from django.db.models import Q
from django.conf import settings
from django.utils import timezone
@ -99,7 +97,7 @@ class Queue(models.Model):
def current_song(self):
songs = self.get_songs()
if len(songs) < 1:
if not songs:
return None
song = songs[0]
if song.state != 1:
@ -136,7 +134,8 @@ class Queue(models.Model):
playlist_song.save()
# If the song was auto-queue'd, then remove it from the auto-queue
autolist_songs = PlaylistSong.objects.filter(playlist=self.random_playlist, state=0, song=song).delete()
autolist_songs = PlaylistSong.objects.filter(playlist=self.random_playlist, state=0, song=song)
autolist_songs.delete()
return None

View File

@ -1,3 +0,0 @@
from django.test import TestCase
# Create your tests here.

View File

@ -1,8 +1,2 @@
from django.conf.urls import url
from . import views
app_name = 'queue'
urlpatterns = [
]
urlpatterns = []