Fix (innocuous) mypy warning

This commit is contained in:
Keith Edmunds 2023-11-29 22:01:38 +00:00
parent 9cbdccb98b
commit 1502b10701

View File

@ -1,5 +1,5 @@
from pprint import pprint
from typing import Callable, cast, List, Optional, TYPE_CHECKING
from typing import Callable, cast, List, Optional, overload, TYPE_CHECKING
from PyQt6.QtCore import (
QEvent,
@ -255,12 +255,20 @@ class PlaylistTab(QTableView):
event.accept()
@overload
def edit(self, index: QModelIndex) -> None:
...
@overload
def edit(
self,
index: QModelIndex,
trigger: QAbstractItemView.EditTrigger,
event: Optional[QEvent],
event: Optional[QEvent]
) -> bool:
...
def edit(self, index, trigger, event):
"""
Override QAbstractItemView.edit to catch when editing starts