Cleanup mypy lint

This commit is contained in:
Christopher T. Johnson
2024-03-13 17:43:24 -04:00
parent af4f7ef3f0
commit 50ffa6198f

View File

@@ -19,9 +19,9 @@ from PyQt6.QtCore import (
pyqtSignal,
pyqtSlot,
)
from PyQt6.QtGui import QContextMenuEvent
from PyQt6.QtSql import QSqlDatabase, QSqlQuery, QSqlQueryModel
from PyQt6.QtWidgets import QApplication, QFileDialog, QMainWindow, QMenu
from PyQt6.QtGui import QContextMenuEvent
from lib import Book, PersonDialog, ReadDialog, SessionDialog, query_error
from lib.preferences import Preferences
@@ -60,7 +60,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.show()
return
def contextMenuEvent(self, event: QContextMenuEvent) -> None:
def contextMenuEvent(self, event: Optional[QContextMenuEvent]) -> None:
assert event is not None
localPos = self.peopleView.mapFromGlobal(event.globalPos())
if not self.peopleView.rect().contains(localPos):
return