Update linting for main code
This commit is contained in:
@@ -20,7 +20,7 @@ General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
""" # noqa
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
@@ -34,6 +34,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class StatusLED(QAbstractButton):
|
||||
"""Custom: LED Style Indicator."""
|
||||
|
||||
__slots__ = ("_color", "_negative", "_neutral", "_postitve", "_state")
|
||||
|
||||
@@ -46,7 +47,6 @@ class StatusLED(QAbstractButton):
|
||||
self._state = None
|
||||
self.setFixedWidth(sW)
|
||||
self.setFixedHeight(sH)
|
||||
return
|
||||
|
||||
@property
|
||||
def state(self) -> bool | None:
|
||||
@@ -59,7 +59,6 @@ class StatusLED(QAbstractButton):
|
||||
self._postitve = positive
|
||||
self._negative = negative
|
||||
self.setState(self._state)
|
||||
return
|
||||
|
||||
def setState(self, state: bool | None) -> None:
|
||||
"""Set the colour state."""
|
||||
@@ -71,7 +70,6 @@ class StatusLED(QAbstractButton):
|
||||
self._color = self._neutral
|
||||
self._state = state
|
||||
self.update()
|
||||
return
|
||||
|
||||
def paintEvent(self, event: QPaintEvent) -> None:
|
||||
"""Draw the LED."""
|
||||
@@ -82,4 +80,3 @@ class StatusLED(QAbstractButton):
|
||||
painter.setOpacity(1.0)
|
||||
painter.drawEllipse(1, 1, self.width() - 2, self.height() - 2)
|
||||
painter.end()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user