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