Skip to content

Commit

Permalink
Expand ExtractTree type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
m3nu committed Apr 16, 2023
1 parent b851bae commit 76494bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vorta/views/extract_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dataclasses import dataclass
from datetime import datetime
from pathlib import PurePath
from typing import Optional
from typing import Optional, Union
from PyQt6 import uic
from PyQt6.QtCore import QDateTime, QLocale, QMimeData, QModelIndex, QPoint, Qt, QThread, QUrl
from PyQt6.QtGui import QColor, QKeySequence, QShortcut
Expand Down Expand Up @@ -378,7 +378,7 @@ def headerData(
self,
section: int,
orientation: Qt.Orientation,
role: int = Qt.ItemDataRole.DisplayRole,
role: Union[int, Qt.ItemDataRole] = Qt.ItemDataRole.DisplayRole,
):
"""
Get the data for the given role and section in the given header.
Expand Down Expand Up @@ -414,7 +414,7 @@ def headerData(

return None

def data(self, index: QModelIndex, role: int = Qt.ItemDataRole.DisplayRole):
def data(self, index: QModelIndex, role: Union[int, Qt.ItemDataRole] = Qt.ItemDataRole.DisplayRole):
"""
Get the data for the given role and index.
Expand Down Expand Up @@ -532,7 +532,7 @@ def data(self, index: QModelIndex, role: int = Qt.ItemDataRole.DisplayRole):
if role == Qt.ItemDataRole.CheckStateRole and column == 0:
return item.data.checkstate

def setData(self, index: QModelIndex, value: Qt.CheckState, role: int = Qt.ItemDataRole.DisplayRole) -> bool:
def setData(self, index: QModelIndex, value: Qt.CheckState, role: Union[int, Qt.ItemDataRole]) -> bool:
"""
Sets the role data for the item at index to value.
Expand Down

0 comments on commit 76494bb

Please sign in to comment.