Cleanup mypy lint
This commit is contained in:
5
main.py
5
main.py
@@ -19,9 +19,9 @@ from PyQt6.QtCore import (
|
|||||||
pyqtSignal,
|
pyqtSignal,
|
||||||
pyqtSlot,
|
pyqtSlot,
|
||||||
)
|
)
|
||||||
|
from PyQt6.QtGui import QContextMenuEvent
|
||||||
from PyQt6.QtSql import QSqlDatabase, QSqlQuery, QSqlQueryModel
|
from PyQt6.QtSql import QSqlDatabase, QSqlQuery, QSqlQueryModel
|
||||||
from PyQt6.QtWidgets import QApplication, QFileDialog, QMainWindow, QMenu
|
from PyQt6.QtWidgets import QApplication, QFileDialog, QMainWindow, QMenu
|
||||||
from PyQt6.QtGui import QContextMenuEvent
|
|
||||||
|
|
||||||
from lib import Book, PersonDialog, ReadDialog, SessionDialog, query_error
|
from lib import Book, PersonDialog, ReadDialog, SessionDialog, query_error
|
||||||
from lib.preferences import Preferences
|
from lib.preferences import Preferences
|
||||||
@@ -60,7 +60,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||||||
self.show()
|
self.show()
|
||||||
return
|
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())
|
localPos = self.peopleView.mapFromGlobal(event.globalPos())
|
||||||
if not self.peopleView.rect().contains(localPos):
|
if not self.peopleView.rect().contains(localPos):
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user