Fix Python 3.9 incompatible type

This commit is contained in:
Veronica Berglyd Olsen
2024-11-23 20:29:02 +01:00
parent c1ed0647fe
commit be6888f8c8
3 changed files with 12 additions and 4 deletions
+5 -1
View File
@@ -30,6 +30,7 @@ from enum import Enum
from functools import partial
from pathlib import Path
from time import time
from typing import TYPE_CHECKING
from PyQt5.QtCore import QCoreApplication
@@ -44,12 +45,15 @@ from novelwriter.core.options import OptionState
from novelwriter.core.projectdata import NWProjectData
from novelwriter.core.projectxml import ProjectXMLReader, ProjectXMLWriter, XMLReadState
from novelwriter.core.sessions import NWSessionLog
from novelwriter.core.status import T_StatusKind, T_UpdateEntry
from novelwriter.core.storage import NWStorage, NWStorageOpen
from novelwriter.core.tree import NWTree
from novelwriter.enum import nwItemClass, nwItemLayout, nwItemType
from novelwriter.error import logException
if TYPE_CHECKING: # pragma: no cover
# Requires Python 3.10
from novelwriter.core.status import T_StatusKind, T_UpdateEntry
logger = logging.getLogger(__name__)