Lint
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import datetime
|
||||
from typing import Any
|
||||
|
||||
from PySide6.QtCore import (
|
||||
QAbstractTableModel,
|
||||
@@ -54,9 +55,11 @@ class docketModel(QAbstractTableModel):
|
||||
) -> int:
|
||||
return 2
|
||||
|
||||
def data(self, index: QModelIndex | QPersistentModelIndex, role: int = 0):
|
||||
def data(
|
||||
self, index: QModelIndex | QPersistentModelIndex, role: int = 0
|
||||
) -> Any:
|
||||
if not index.isValid():
|
||||
return ""
|
||||
return None
|
||||
if role == Qt.ItemDataRole.DisplayRole:
|
||||
return self.entries[index.row()][index.column()]
|
||||
if role == Qt.ItemDataRole.TextAlignmentRole and index.column() == 0:
|
||||
@@ -65,13 +68,13 @@ class docketModel(QAbstractTableModel):
|
||||
|
||||
def headerData(
|
||||
self, section: int, orientation: Qt.Orientation, role: int = 0
|
||||
):
|
||||
) -> str | None | QFont:
|
||||
if orientation == Qt.Orientation.Vertical:
|
||||
return
|
||||
return None
|
||||
if role == Qt.ItemDataRole.FontRole:
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
return font
|
||||
if role != Qt.ItemDataRole.DisplayRole:
|
||||
return
|
||||
return None
|
||||
return ["Date", "Proceedings and Orders"][section]
|
||||
|
||||
Reference in New Issue
Block a user