Upgrade pylint to V2.2.2

It now understands type comments, so remove a bunch of disable=unused-import pragmas.
looper
Ben Niemann 2018-12-21 19:12:26 +01:00
parent 66d7f8c6af
commit 98328ca0fd
85 changed files with 125 additions and 124 deletions

View File

@ -81,7 +81,7 @@ PIP_DEPS = {
PKG('mox3'),
PKG('py-cpuinfo'),
PKG('pyfakefs'),
PKG('pylint==1.9.3'),
PKG('pylint==2.2.2'),
PKG('mypy==0.610'),
PKG('mypy-extensions'),
],

View File

@ -20,7 +20,7 @@
#
# @end:license
import asyncio # pylint: disable=unused-import
import asyncio
import logging
from typing import Any, Dict, Optional, Set, Tuple

View File

@ -24,7 +24,7 @@ import functools
import logging
import sys
import uuid
from typing import cast, Any, Optional, Dict, List, Set, Tuple # pylint: disable=unused-import
from typing import cast, Any, Optional, Dict, List, Set, Tuple
import posix_ipc

View File

@ -21,12 +21,12 @@
# @end:license
import logging
from typing import Any, Dict, List, Optional, Set # pylint: disable=unused-import
from typing import Any, Dict, List, Optional, Set
import toposort
from noisicaa import core
from noisicaa.core import ipc # pylint: disable=unused-import
from noisicaa.core import ipc
from noisicaa import audioproc
from noisicaa import node_db
from noisicaa import host_system as host_system_lib

View File

@ -26,7 +26,8 @@ import functools
import logging
import os
import threading
from typing import Any, Dict, Tuple # pylint: disable=unused-import
import typing
from typing import Any, Dict, Tuple
import uuid
import warnings
@ -50,7 +51,9 @@ from noisicaa import node_db
from noisicaa.audioproc.public import plugin_state_pb2
from . import plugin_host_pb2
from . import plugin_host
from . import plugin_ui_host # pylint: disable=unused-import
if typing.TYPE_CHECKING:
from . import plugin_ui_host
logger = logging.getLogger(__name__)

View File

@ -24,7 +24,7 @@ import collections
import logging
import random
import threading
from typing import Any, Dict, Callable, List, Optional, Generic, TypeVar # pylint: disable=unused-import
from typing import Any, Dict, Callable, Generic, TypeVar
logger = logging.getLogger(__name__)

View File

@ -30,7 +30,7 @@ import pickle
import pprint
import time
import traceback
from typing import cast, Any, Optional, Dict, Callable # pylint: disable=unused-import
from typing import cast, Any, Optional, Dict, Callable
import uuid
from . import stats

View File

@ -29,7 +29,6 @@ import importlib
import logging
import os
import pickle
import resource # pylint: disable=unused-import
import select
import shutil
import signal
@ -39,9 +38,8 @@ import tempfile
import threading
import time
import traceback
from typing import ( # pylint: disable=unused-import
cast, Any, Optional, Callable, Iterator, Dict, List, Set, Tuple
)
import typing
from typing import cast, Any, Optional, Callable, Iterator, Dict, List, Set, Tuple
import eventfd
@ -50,6 +48,9 @@ from . import stats
from . import stacktrace
from .logging import init_pylogging
if typing.TYPE_CHECKING:
import resource
logger = logging.getLogger(__name__)

View File

@ -24,7 +24,7 @@ import asyncio
import functools
import io
import logging
from typing import Any, List, Dict, Type # pylint: disable=unused-import
from typing import Any, List, Dict, Type
import uuid
from . import ipc

View File

@ -23,7 +23,7 @@
import logging
import threading
import time
from typing import Dict, List, Tuple, Type, TypeVar # pylint: disable=unused-import
from typing import Dict, List, Tuple, Type, TypeVar
import psutil

View File

@ -22,7 +22,7 @@
import collections
import logging
from typing import List, MutableMapping, MutableSequence, Union # pylint: disable=unused-import
from typing import List, MutableMapping, MutableSequence, Union
from . import stats

View File

@ -30,7 +30,7 @@ import time
import struct
import queue
import threading
from typing import cast, Any, Dict, List, Set, Tuple, IO # pylint: disable=unused-import
from typing import cast, Dict, List, Set, Tuple, IO
from mypy_extensions import TypedDict
import portalocker

View File

@ -27,8 +27,8 @@ import os
import signal
import textwrap
import unicodedata
from typing import ( # pylint: disable=unused-import
Any, Optional, Awaitable, Callable, Iterable, Iterator, Dict, List, Set, Tuple, Union
from typing import (
Any, Optional, Awaitable, Callable, Iterable, Iterator, Dict, List, Tuple, Union
)
import psutil

View File

@ -20,7 +20,7 @@
#
# @end:license
from typing import Any, Dict # pylint: disable=unused-import
from typing import Any
class MidiEvent(object):

View File

@ -23,7 +23,7 @@
import logging
import select
import threading
from typing import Any, Iterator, Callable, Dict, Tuple # pylint: disable=unused-import
from typing import Any, Iterator, Callable, Dict, Tuple
from noisicaa import core
from . import libalsa

View File

@ -22,7 +22,7 @@
import threading
from unittest import mock
from typing import Dict, Iterable # pylint: disable=unused-import
from typing import Dict, Iterable
from noisidev import unittest
from . import libalsa

View File

@ -24,7 +24,7 @@ import os.path
import io
import logging
import struct
from typing import List, IO # pylint: disable=unused-import
from typing import List, IO
logger = logging.getLogger(__name__)

View File

@ -22,7 +22,7 @@
import logging
import struct
from typing import List, Set, Tuple, IO # pylint: disable=unused-import
from typing import List, Set, Tuple, IO
from . import riff

View File

@ -22,7 +22,7 @@
import logging
import struct
from typing import Set, List, IO # pylint: disable=unused-import
from typing import Set, List, IO
from . import riff

View File

@ -22,7 +22,7 @@
import asyncio
import logging
from typing import Dict, Set, List, Iterable # pylint: disable=unused-import
from typing import Dict, Set, List, Iterable
from noisicaa import core
from noisicaa.core import ipc

View File

@ -29,7 +29,7 @@ import queue
import sys
import threading
import time
from typing import Any, Callable, Dict, List, Set, Iterable # pylint: disable=unused-import
from typing import Any, Callable, Dict, List, Set, Iterable
from noisicaa import core
from noisicaa import instrument_db

View File

@ -23,7 +23,7 @@
import logging
import os
import os.path
from typing import Dict, Iterable, Any # pylint: disable=unused-import
from typing import Dict, Iterable, Any
from noisicaa import instrument_db
from noisicaa.instr import wave

View File

@ -21,7 +21,7 @@
# @end:license
import logging
from typing import Iterable # pylint: disable=unused-import
from typing import Iterable
from noisicaa import instrument_db
from noisicaa.instr import soundfont

View File

@ -22,14 +22,14 @@
import logging
import time
from typing import cast, Any, List, Set # pylint: disable=unused-import
from typing import cast, Any, List, Set
from noisicaa import constants
from noisicaa import core
from .private import db
from . import process_base
from . import mutations as mutations_lib # pylint: disable=unused-import
from . import mutations as mutations_lib
logger = logging.getLogger(__name__)

View File

@ -24,7 +24,7 @@ import sys
import logging.handlers
from logging import * # pylint: disable=W0614,W0401
import queue
from typing import Any, Dict, Optional, List, Tuple, Type # pylint: disable=unused-import
from typing import Any, Dict, Optional, List, Tuple
from . import runtime_settings as runtime_settings_lib

View File

@ -21,7 +21,7 @@
# @end:license
import logging
from typing import Dict # pylint: disable=unused-import
from typing import Dict
from noisidev import unittest
from noisicaa.constants import TEST_OPTS

View File

@ -21,9 +21,7 @@
# @end:license
import collections
from typing import cast, Any, Optional, Type, Iterator, Dict, List, Tuple # pylint: disable=unused-import
from google.protobuf import message as protobuf # pylint: disable=unused-import
from typing import cast, Any, Optional, Type, Iterator, List, Tuple
from noisidev import unittest
from noisicaa import core

View File

@ -21,7 +21,7 @@
# @end:license
import re
from typing import Optional, Union, Dict, List, Set, Tuple # pylint: disable=unused-import
from typing import Optional, Union, Dict, List, Set, Tuple
from google.protobuf import message as protobuf

View File

@ -22,9 +22,7 @@
import fractions
import logging
from typing import cast, Any, Dict, Set, Iterator, Sequence, List, Union # pylint: disable=unused-import
from google.protobuf import message as protobuf # pylint: disable=unused-import
from typing import cast, Any, Dict, Set, Sequence, List, Union
from noisicaa.core.typing_extra import down_cast
from noisicaa import core

View File

@ -22,14 +22,14 @@
import logging
import random
from typing import Any, Optional, Callable, Iterator, Dict, List, Type # pylint: disable=unused-import
from typing import Any, Optional, Callable, Iterator, Dict, List, Type
from google.protobuf import message as protobuf
from noisicaa.core.typing_extra import down_cast
from noisicaa import audioproc
from noisicaa import model
from noisicaa import core # pylint: disable=unused-import
from noisicaa import core
from . import pipeline_graph
from . import pmodel
from . import commands

View File

@ -21,7 +21,7 @@
# @end:license
import logging
from typing import Type # pylint: disable=unused-import
from typing import Type
from noisidev import unittest
from . import commands_pb2

View File

@ -22,9 +22,7 @@
import logging
import time
from typing import ( # pylint: disable=unused-import
cast, Any, Optional, Generator, Dict, List, Tuple, Type
)
from typing import Any, Dict, Type
from google.protobuf import message as protobuf

View File

@ -26,7 +26,7 @@ import uuid
from noisidev import unittest_mixins
from noisicaa.constants import TEST_OPTS
from noisicaa import model # pylint: disable=unused-import
from noisicaa import model
from . import project_client
logger = logging.getLogger(__name__)

View File

@ -22,14 +22,14 @@
import logging
import random
from typing import cast, Any, Dict, Optional, Iterator # pylint: disable=unused-import
from typing import cast, Any, Dict, Optional, Iterator
from google.protobuf import message as protobuf
from noisicaa.core.typing_extra import down_cast
from noisicaa import audioproc
from noisicaa import model
from noisicaa import core # pylint: disable=unused-import
from noisicaa import core
from . import pmodel
from . import base_track
from . import commands

View File

@ -20,7 +20,7 @@
#
# @end:license
from typing import List # pylint: disable=unused-import
from typing import List
from noisidev import unittest
from noisidev import unittest_mixins

View File

@ -23,11 +23,11 @@
import contextlib
import copy
import logging
from typing import Any, Iterable, List, Tuple, Generator # pylint: disable=unused-import
from typing import Any, Generator
from noisicaa import audioproc
from noisicaa import model
from noisicaa import core # pylint: disable=unused-import
from noisicaa import core
from . import pmodel
from . import mutations_pb2

View File

@ -23,7 +23,7 @@
#import io
import logging
#from xml.etree import ElementTree
from typing import cast, Any, Optional, Union, Iterator, List # pylint: disable=unused-import
from typing import Any, Optional, Iterator, List
from google.protobuf import message as protobuf

View File

@ -24,7 +24,7 @@ import asyncio
import concurrent.futures
import logging
import uuid
from typing import cast, Any, Optional, Iterator, Dict, Tuple # pylint: disable=unused-import
from typing import cast, Any, Optional, Iterator, Dict, Tuple
from noisicaa import core
from noisicaa.core import ipc
@ -32,7 +32,7 @@ from noisicaa import audioproc
from noisicaa import model
from . import pmodel
from . import base_track # pylint: disable=unused-import
from . import base_track
logger = logging.getLogger(__name__)

View File

@ -20,7 +20,7 @@
#
# @end:license
from typing import Type # pylint: disable=unused-import
from typing import Type
from noisidev import unittest
from noisicaa import audioproc

View File

@ -22,7 +22,7 @@
import itertools
import logging
from typing import cast, Any, Optional, Iterator, Dict, Tuple, Type # pylint: disable=unused-import
from typing import cast, Any, Optional, Iterator, Dict, Type
from google.protobuf import message as protobuf

View File

@ -25,9 +25,7 @@ from fractions import Fraction
import getpass
import logging
import socket
from typing import ( # pylint: disable=unused-import
cast, Any, Optional, Dict, Tuple, Callable, Iterable, Iterator, Sequence, Type, TypeVar
)
from typing import cast, Any, Dict, Tuple, Callable, Sequence, TypeVar
from noisicaa.core.typing_extra import down_cast
from noisicaa import audioproc

View File

@ -24,7 +24,6 @@ import fractions
import logging
import os.path
import uuid
from typing import Dict # pylint: disable=unused-import
from noisidev import unittest
from noisidev import unittest_mixins

View File

@ -24,7 +24,7 @@ import copy
import logging
import os.path
import uuid
from typing import Dict, Tuple # pylint: disable=unused-import
from typing import Dict, Tuple
import async_generator
from google.protobuf import message as protobuf
@ -32,8 +32,8 @@ from google.protobuf import message as protobuf
from noisidev import unittest
from noisidev import unittest_mixins
from noisicaa.constants import TEST_OPTS
from noisicaa import model # pylint: disable=unused-import
from noisicaa.model import model_base_pb2 # pylint: disable=unused-import
from noisicaa import model
from noisicaa.model import model_base_pb2
from . import project_client
from . import commands_pb2

View File

@ -26,7 +26,8 @@ import logging
import os
import os.path
import pickle
from typing import cast, Any, Optional, Iterator, Sequence, Type, Dict, List, Tuple, TypeVar # pylint: disable=unused-import
import typing
from typing import cast, Any, Optional, Type, Dict, Tuple, TypeVar
from noisicaa import core
from noisicaa.core import ipc
@ -39,9 +40,11 @@ from . import commands
from . import commands_pb2
from . import player as player_lib
from . import render
from . import pmodel # pylint: disable=unused-import
from . import render_settings_pb2
if typing.TYPE_CHECKING:
from . import pmodel
logger = logging.getLogger(__name__)

View File

@ -29,7 +29,7 @@ import os
import os.path
import time
import uuid
from typing import cast, Any, Union, Callable, Awaitable, List, Tuple, Text # pylint: disable=unused-import
from typing import cast, Any, Union, Callable, Awaitable, List, Tuple, Text
from noisicaa.core.typing_extra import down_cast
@ -161,8 +161,8 @@ class Encoder(object):
render_settings_pb2.RenderSettings.MP3: Mp3Encoder,
render_settings_pb2.RenderSettings.FAIL__TEST_ONLY__: FailingEncoder,
}
cls = cls_map[settings.output_format]
return cls(settings=settings, **kwargs)
encoder_cls = cls_map[settings.output_format]
return encoder_cls(settings=settings, **kwargs)
def get_writer(self) -> asyncio.StreamWriter:
raise NotImplementedError

View File

@ -23,14 +23,14 @@
import fractions
import logging
import random
from typing import cast, Any, List, Optional, Dict, Iterator # pylint: disable=unused-import
from typing import Any, List, Optional, Dict, Iterator
from google.protobuf import message as protobuf
from noisicaa.core.typing_extra import down_cast
from noisicaa import audioproc
from noisicaa import model
from noisicaa import core # pylint: disable=unused-import
from noisicaa import core
from noisicaa.bindings import sndfile
from . import pmodel
from . import base_track

View File

@ -21,7 +21,7 @@
# @end:license
import os.path
from typing import List # pylint: disable=unused-import
from typing import List
from noisidev import unittest
from noisidev import unittest_mixins

View File

@ -20,7 +20,7 @@
#
# @end:license
from typing import List # pylint: disable=unused-import
from typing import List
from noisidev import unittest
from noisidev import unittest_mixins

View File

@ -22,7 +22,7 @@
import asyncio
import logging
from typing import Dict, Iterable, Set, Tuple # pylint: disable=unused-import
from typing import Dict, Iterable, Set, Tuple
from noisicaa import core
from noisicaa.core import ipc

View File

@ -21,7 +21,7 @@
# @end:license
import logging
from typing import Iterator, Dict # pylint: disable=unused-import
from typing import Iterator, Dict
from noisicaa import node_db

View File

@ -21,7 +21,7 @@
# @end:license
import logging
from typing import cast, Any, Set, Dict, List # pylint: disable=unused-import
from typing import cast, Any, Set
from noisicaa import core
from .private import db

View File

@ -26,7 +26,7 @@ import pprint
import sys
import traceback
import types
from typing import Any, Optional, Callable, Sequence, Dict, Type # pylint: disable=unused-import
from typing import Any, Optional, Callable, Sequence, Dict, Type
from PyQt5 import QtCore
from PyQt5 import QtWidgets

View File

@ -22,7 +22,7 @@
import logging
import textwrap
from typing import cast, Any, Optional, Iterator, List # pylint: disable=unused-import
from typing import cast, Any, Optional, Iterator
from PyQt5.QtCore import Qt
from PyQt5 import QtCore

View File

@ -23,7 +23,7 @@
# mypy: loose
import functools
from typing import List # pylint: disable=unused-import
from typing import List
from PyQt5.QtCore import Qt
from PyQt5 import QtCore

View File

@ -28,7 +28,7 @@ import pprint
import random
import textwrap
import uuid
from typing import cast, Any, Optional, Iterator, List, Tuple # pylint: disable=unused-import
from typing import cast, Any, Optional, Iterator, List, Tuple
from PyQt5.QtCore import Qt
from PyQt5 import QtCore

View File

@ -21,7 +21,7 @@
# @end:license
import math
from typing import cast, Optional, Union, Dict # pylint: disable=unused-import
from typing import cast, Optional, Union, Dict
from PyQt5.QtCore import Qt
from PyQt5 import QtCore
@ -30,7 +30,7 @@ from PyQt5 import QtWidgets
from noisicaa import devices
from noisicaa import model
from noisicaa import core # pylint: disable=unused-import
from noisicaa import core
from . import qled

View File

@ -22,7 +22,7 @@
import functools
import logging
from typing import cast, Any, Optional, Dict, List, Set # pylint: disable=unused-import
from typing import cast, Any, Optional, Dict, List
from PyQt5.QtCore import Qt
from PyQt5 import QtCore

View File

@ -21,7 +21,7 @@
# @end:license
import logging
from typing import cast, Any, Optional, Iterator, Callable, Type, List, Dict, Set # pylint: disable=unused-import
from typing import cast, Any, Optional, Iterator, Callable, Type, List, Dict, Set
from PyQt5.QtCore import Qt
from PyQt5 import QtCore

View File

@ -22,7 +22,7 @@
import functools
import logging
from typing import cast, Any, Optional, Dict, List, Set # pylint: disable=unused-import
from typing import Any, Optional, Dict, List
from PyQt5.QtCore import Qt
from PyQt5 import QtCore

View File

@ -22,7 +22,7 @@
import asyncio
import logging
from typing import cast, Any, Optional, Dict, List, Set # pylint: disable=unused-import
from typing import Any
from PyQt5.QtCore import Qt
from PyQt5 import QtGui

View File

@ -21,12 +21,12 @@
# @end:license
import logging
from typing import cast, Any, Optional, Dict, List, Set # pylint: disable=unused-import
from typing import Any, Dict
from PyQt5.QtCore import Qt
from PyQt5 import QtWidgets
from noisicaa import core # pylint: disable=unused-import
from noisicaa import core
from noisicaa import model
from noisicaa import music
from noisicaa.ui import ui_base

View File

@ -22,7 +22,7 @@
import logging
import os.path
from typing import cast, Any, Optional, Dict, List, Set # pylint: disable=unused-import
from typing import cast, Any
from PyQt5 import QtSvg # type: ignore
from PyQt5 import QtWidgets

View File

@ -22,7 +22,7 @@
import math
import time
from typing import Any, List # pylint: disable=unused-import
from typing import Any, List
from PyQt5.QtCore import Qt
from PyQt5 import QtCore

View File

@ -22,7 +22,7 @@
import logging
import time as time_lib
from typing import cast, Any, Optional, Union, Sequence, Dict, List, Tuple, Type # pylint: disable=unused-import
from typing import Any
from PyQt5 import QtCore

View File

@ -23,7 +23,7 @@
import asyncio
import logging
import os.path
from typing import Dict # pylint: disable=unused-import
from typing import Dict
from PyQt5 import QtCore

View File

@ -22,7 +22,7 @@
import logging
import uuid
from typing import cast, Any, Optional, Union, Sequence, Dict, List, Tuple, Type # pylint: disable=unused-import
from typing import Any, Optional, Tuple
from PyQt5.QtCore import Qt
from PyQt5 import QtCore
@ -30,7 +30,7 @@ from PyQt5 import QtWidgets
from noisicaa.core.typing_extra import down_cast
from noisicaa import audioproc
from noisicaa import core # pylint: disable=unused-import
from noisicaa import core
from noisicaa import node_db
from noisicaa import music
from . import pipeline_graph

View File

@ -24,7 +24,7 @@ import asyncio
import enum
import logging
import os.path
from typing import Any, Optional, Callable, Iterable, BinaryIO, Tuple # pylint: disable=unused-import
from typing import Any, Optional, Callable, Iterable, BinaryIO, Tuple
from PyQt5.QtCore import Qt
from PyQt5 import QtCore

View File

@ -21,7 +21,7 @@
# @end:license
import logging
from typing import Iterator, Set # pylint: disable=unused-import
from typing import Iterator, Set
logger = logging.getLogger(__name__)

View File

@ -22,7 +22,7 @@
import logging
import operator
from typing import cast, Any, Dict, Tuple, Type, Callable, Generic, TypeVar # pylint: disable=unused-import
from typing import cast, Any, Dict, Tuple, Type, Callable, TypeVar
from PyQt5 import QtCore

View File

@ -24,7 +24,7 @@
import functools
import uuid
from typing import List # pylint: disable=unused-import
from typing import List
from PyQt5.QtCore import Qt
from PyQt5 import QtCore

View File

@ -26,7 +26,7 @@ import io
import logging
import os.path
from xml.etree import ElementTree
from typing import Dict, Tuple # pylint: disable=unused-import
from typing import Dict, Tuple
from PyQt5 import QtCore
# TODO: add stubs for PyQt5.QtSvg

View File

@ -22,7 +22,7 @@
import fractions
import logging
from typing import Any, Optional, Union, Dict, List, Type # pylint: disable=unused-import
from typing import Any, Type
from PyQt5.QtCore import Qt
from PyQt5 import QtCore

View File

@ -22,7 +22,7 @@
import fractions
import logging
from typing import Any, List, Tuple # pylint: disable=unused-import
from typing import Any, List, Tuple
from PyQt5.QtCore import Qt
from PyQt5 import QtCore
@ -30,7 +30,7 @@ from PyQt5 import QtGui
from noisicaa.core.typing_extra import down_cast
from noisicaa import audioproc
from noisicaa import core # pylint: disable=unused-import
from noisicaa import core
from noisicaa import music
from noisicaa import model
from . import base_track_editor

View File

@ -22,7 +22,7 @@
import fractions
import logging
from typing import cast, Any, Optional, Union, Sequence, Dict, List, Tuple, Type # pylint: disable=unused-import
from typing import cast, Any, Optional, Union, Dict, List, Type
from PyQt5.QtCore import Qt
from PyQt5 import QtCore
@ -31,7 +31,7 @@ from PyQt5 import QtWidgets
from noisicaa.core.typing_extra import down_cast
from noisicaa import audioproc
from noisicaa import core # pylint: disable=unused-import
from noisicaa import core
from noisicaa import music
from noisicaa import model
from noisicaa.ui import ui_base

View File

@ -23,7 +23,7 @@
import fractions
import itertools
import logging
from typing import Any, Optional, Union, Dict, List, Type # pylint: disable=unused-import
from typing import Any, Optional, Union, Dict, List, Type
from PyQt5.QtCore import Qt
from PyQt5 import QtCore
@ -32,7 +32,7 @@ from PyQt5 import QtWidgets
from noisicaa.core.typing_extra import down_cast
from noisicaa import audioproc
from noisicaa import core # pylint: disable=unused-import
from noisicaa import core
from noisicaa import music
from noisicaa import model
from noisicaa.ui import ui_base

View File

@ -23,7 +23,7 @@
import fractions
import functools
import logging
from typing import Any, List, Tuple # pylint: disable=unused-import
from typing import Any, List, Tuple
from PyQt5.QtCore import Qt
from PyQt5 import QtCore
@ -32,7 +32,7 @@ from PyQt5 import QtWidgets
from noisicaa.core.typing_extra import down_cast
from noisicaa import audioproc
from noisicaa import core # pylint: disable=unused-import
from noisicaa import core
from noisicaa import music
from noisicaa import model
from noisicaa.model import project_pb2
@ -251,7 +251,7 @@ class SampleItem(object):
painter.drawText(3, 20, "Broken")
elif status == 'highres':
samples, = args
samples, = args # pylint: disable=unbalanced-tuple-unpacking
ycenter = self.height() // 2
if self.__highlighted:
@ -271,7 +271,7 @@ class SampleItem(object):
p_y = y
elif status == 'rms':
samples, = args
samples, = args # pylint: disable=unbalanced-tuple-unpacking
ycenter = self.height() // 2
if self.__highlighted: