mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-10 08:02:26 +01:00
fix all pylint complaints
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@ -1,8 +1,2 @@
|
||||
from django.conf.urls import url
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = 'queue'
|
||||
|
||||
urlpatterns = [
|
||||
]
|
||||
urlpatterns = []
|
||||
|
||||
Reference in New Issue
Block a user