Cleanup mypy lint
This commit is contained in:
5
main.py
5
main.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user