Lint picking
This commit is contained in:
9
main.py
9
main.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user