Lint picking

This commit is contained in:
Christopher T. Johnson
2024-02-04 15:06:07 -05:00
parent 38aeb76196
commit 61ebe6cc0b
6 changed files with 112 additions and 119 deletions

View File

@@ -16,7 +16,7 @@ import os
import re
import sys
from datetime import datetime, timedelta
from typing import cast
from typing import Optional
from PyQt6.QtCore import (
QModelIndex,
@@ -98,7 +98,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
return
@pyqtSlot()
def editPreferences(self):
def editPreferences(self) -> None:
dlg = Preferences()
dlg.exec()
return
@@ -134,12 +134,13 @@ class MainWindow(QMainWindow, Ui_MainWindow):
@pyqtSlot()
@pyqtSlot(QModelIndex)
def editPerson(self, index=None) -> None:
def editPerson(self, index: Optional[QModelIndex] = None) -> None:
if not index:
indexes = self.peopleView.selectedIndexes()
if len(indexes) < 1:
return
index = indexes[0]
assert index is not None
dlg = PersonDialog(person_id=index.siblingAtColumn(0).data())
dlg.exec()
return
@@ -324,7 +325,7 @@ if __name__ == "__main__":
uiName = "ui/" + fileName[:-3] + ".ui"
rccName = "ui/" + fileName[:-3] + ".qrc"
if not os.path.isfile(uiName) and not os.path.isfile(rccName):
outOfDate.append(filenName)
outOfDate.append(fileName)
continue
if os.path.isfile(uiName) and os.path.getmtime(
uiName