mypy linting
This commit is contained in:
parent
553376a99e
commit
f2867deb2f
@ -386,12 +386,12 @@ class TrackSelectDialog(QDialog):
|
||||
|
||||
event.accept()
|
||||
|
||||
def keyPressEvent(self, event: QKeyEvent) -> None:
|
||||
def keyPressEvent(self, event: QKeyEvent | None) -> None:
|
||||
"""
|
||||
Clear selection on ESC if there is one
|
||||
"""
|
||||
|
||||
if event.key() == Qt.Key.Key_Escape:
|
||||
if event and event.key() == Qt.Key.Key_Escape:
|
||||
if self.ui.matchList.selectedItems():
|
||||
self.ui.matchList.clearSelection()
|
||||
return
|
||||
|
||||
@ -305,6 +305,7 @@ def normalise_track(path: str) -> None:
|
||||
os.chown(path, stats.st_uid, stats.st_gid)
|
||||
os.chmod(path, stats.st_mode)
|
||||
# Copy tags
|
||||
tag_handler: type[FLAC | MP3]
|
||||
if ftype == "flac":
|
||||
tag_handler = FLAC
|
||||
elif ftype == "mp3":
|
||||
|
||||
@ -1816,8 +1816,8 @@ if __name__ == "__main__":
|
||||
|
||||
msg = stackprinter.format(exc)
|
||||
send_mail(
|
||||
Config.ERRORS_TO,
|
||||
Config.ERRORS_FROM,
|
||||
",".join(Config.ERRORS_TO),
|
||||
",".join(Config.ERRORS_FROM),
|
||||
"Exception from musicmuster",
|
||||
msg,
|
||||
)
|
||||
|
||||
@ -103,8 +103,9 @@ class _FadeCurve:
|
||||
self.GraphWidget.clear()
|
||||
|
||||
def plot(self) -> None:
|
||||
self.curve = self.GraphWidget.plot(self.graph_array)
|
||||
self.curve.setPen(Config.FADE_CURVE_FOREGROUND)
|
||||
if self.GraphWidget:
|
||||
self.curve = self.GraphWidget.plot(self.graph_array)
|
||||
self.curve.setPen(Config.FADE_CURVE_FOREGROUND)
|
||||
|
||||
def tick(self, play_time) -> None:
|
||||
"""Update volume fade curve"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user